There are a few cases of a plant turning hermi or male, but all the plants turning male is or hermi is very unusual. The customers are home growers most of the time, and they use very small setups, so heat problems are not so hard. Customers growing bigger amounts are there too, but we dont hear problems from them, they just come again for more. The problem often is the heat control, if the environment is too hot during the first month specially, this is a stress factor, mainly responsible for the sex change.

To control properly the problem, follow those advices:

First month of life, use no more than 40.000 lumen per meter. This is 400 watt per meter at 60 cm roughly. Once they are  flowering and are female is not a problem to increase lighting, but not before.

Never Ever use son t plus bulbs, they have too much red, good for flowering but not for growing feminized, red light tends to produce hermis too. Use Son t agro or Green power, which are for growth and bloom, and have less red and more blue.

Temperature can not go too High, 27 should be the Max during the first month. Once they are blooming it doesn’t matter so much, but in the first month this is critically important.

Never let the plants go too dry during the first month and a half.

High levels of N and lower levels of K will promote feminine expression.

All those factors are known to promote female expression, and doing the
opposite promotes male expression.

You want to avoid:

Too much light
Too red light
Too much heat
Too dry substrat
Too much K
Too little N