According to the TPO roofing membrane manufacturers, Alpha Systems and DICOR, the answer is, "Staining will not affect membrane performance."
Alpha Systems has some good information in the FAQ section of their website concerning "chemicals sprayed on the wood under the membrane" and how they can affect the top surface:
https://alphallc.us/products/roofing/
DICOR also has some good information concerning their TPO membrane:
https://dicorproducts.com/faq/
To me, the bottom line is that mold/mildew are "supposed to not grow" on TPO roofing material. I've seen lots and LOTS of mold/mildew on RV roofs. There has to be a reason. What I've found, at least what I "think" I've found is that the actual membrane will not support mold, but anything that's sitting on the surface will definitely become "food for mold"... So, the answer to staining and discoloration on any RV roof is, IMO, to keep it clean, keep it dry and keep it sealed.