Velcro would also work to hold up the sun shade. I'm not sure if the adhesive on the Velcro backing would lose it's grip on inside of the the glass roof in the sun, summer heat.
3M manufacturers adhesive material for use with windshield dash cam mounts. This generally stays in place even in the sun, summer temperatures. When you want to remove the 3M adhesive pad from the windshield you can slice through the adhesive pad using dental floss (this really works), then remove any remaining adhesive from the glass with a small amount of solvent such as lighter fluid, Goo Gone, etc, on a paper towel.