It will stay in itz new form until switched out. Since it no longer haz Forecast, it can't change back.
>Hey its Rio! sent out Castform!
Castform transformed! (into Sun form)
The foe's Delcatty used Simple Beam!
Castform acquired Simple!
The foe's Delcatty used Simple Beam!
But it failed!
>Castform used Rain Dance!
It started to rain! (It's still in its sun form)
Hey its Rio! called Castform back!
Hey its Rio! sent out Castform!
Castform transformed! (Rain)
The foe's Delcatty used Simple Beam!
Castform acquired Simple!
Castform used Hail!
It started to hail!
The hail crashes down.
The foe's Delcatty is buffeted by the hail!
Castform is buffeted by the hail!
CREDIT TO RUOPPSTER!
So Castform stays in whatever form it was in when hit with simple beam. Simple as that.
Hope this helps! •^-^•