Anti-Trap Protection
WARNING: This page is about a different car, the 2020 Jaguar XE and 2019 Jaguar XE. However, it is still accessible from the selected car via links, so may be relevant.
The roof opening panel has an 'anti-trap' protection function which stops the panel from closing if an obstruction is sensed. When an obstruction is sensed, the motors automatically retract the panel as far as possible. When the obstruction is removed, you can close the panel by using the normal method.