I personally haven't experienced any problems with sun cream stains on clothes but it might be simply because perhaps actually it stained but I managed to wash it away so it didn't cause much concern to me, I don't know.
Anyway, according to google:
"Say no to avobenzone
You’re not alone if you don’t spend time reading through every listed ingredient on a potential sunscreen. It isn’t always common practice. It can help you in avoiding stains on your clothes, however.
There’s an ingredient called avobenzone, which is commonly used in sunscreens, and it can stain your clothes (especially whites) very easily! Stains caused by avobenzone are often orange or brown. Not only are they dark, but they’re really challenging to remove.
Needless to say, the easiest way to avoid these dark stains is to stick to sunscreens that are completely free of avobenzone. Time to start reading the ingredients list!
Consider oil-free sunscreens
What happens if you spill cooking oil on your clothes? It’s not the easiest stain to remove, right? The same principle applies to skincare products. If you’re using a sunscreen that contains oil, then you’re increasing your chances of staining your clothes.
When the oils in sunscreens mix with the other ingredients, there’s no telling what stains might be produced, and how difficult they might be to remove. Sticking to oil-free,non-greasy sunscreencould make your life a little easier when it comes to avoiding and removing stains.
Water resistant and fast drying
If you apply sunscreen and put clothes on right away, there’s a good chance some of theneck sunscreenwill make contact with the fabric. It may serve you well to find products that dry quickly after application. This way, you are less likely to stain your clothes because of sunscreen that hasn’t fully absorbed.
Likewise, you want to invest in sunscreens that are water resistant. Think about it. If your sunscreen does not provide water resistance and you start sweating, what will happen? Your sunscreen will start to melt right away. If you’re wearing clothing and your sunscreen melts, it is very likely that your clothes will stain.
So invest in water resistance and try to find sunscreens that dry quickly, or simply adjust your timeline to allow time for you sunscreen to dry properly before wearing clothes! These steps will help in preventing stained clothes."
Here's the link: simplysunsafe.com/best-sunscreen-for-not-staining-clothes/
Hope it helps.