I have the same issue..... I use a putty knife, to tuck the material back into the edges....
I never open my sunroof. And, my personal belief, .. removing the glass is not worth the risks....
I was thinking, to rip apart the material, on a shade, at a salvage yard, to see what it looks like...