Hi Kieran...welcome to the Club
Wow!!! that's a stunning looking Z4....you've done some great mods to her, especially the roof panel
Good to have you onboard
Cheers, Trevor
Hi Ian...welcome to the Forum
Have seen this a few times on different cars, proper way would be to remove it and replace the broken clips.
Alternatively a bit of glue or self adhesive tape may work