You have to open the sunshade and then remove the rubber accordion deflectors along the sides of the pane. The torx screws will be visible with the accordions removed. Use a magnet along with the torx driver, they're special screws and probably not stocked at the dealership, so you don't want to lose them down in the headliner. Try this post, the OP had to repair his gasket not long ago:
2018-rogue-moon-roof-weatherstripping-r ... 31380.html
If you're replacing the seal because of a water leak, don't bother. That seal is an air-stop and isn't intended to stop water in any fashion. The trouble will be in your drains.