I would think if it was a sunroof drain issue, the leak would be near the front or middle and not the back. I would suspect the roof rack screw holes. Remove the roof rack. Suck or blow out the holes really well, maybe even spray a little brake cleaner in them. Clean up the screws and reinstall the roof rack with some clear silicone RTV on each screw. This will seal the screw holes and stop the water penetration into your headliner.
But, checking your sunroof drains also wouldn't be a bad idea. I have a video for it. If you park at a slant with the front higher than the rear, water leaking in because the sunroof drains are clogged could show up where you're seeing the stain.
After doing all that and you still have a leak, maybe drop the headliner and investigate further.
On mine the rear driver sun roof drain tube popped off the pipe attached to the sunroof, I was able to remove a few things from the rear driver door area and pry the the headliner down and reattach the tube using long needle nose pliers, that water showed up around the rear footwell.
On my '97 SR5 the stains and issues are more toward the front of the vehicle, engine side of the sunroof. These sunroofs. Still trying to figure out what the issue is, which lead me here, which will lead me to some of the links posted above.
It’s not the Sun roof drains. I poured water into the drains and water comes out all 4 drains. And this stain is on the passenger rear. Gonna remove roof rack and see what I find.