That is interesting. I don’t get that behavior, but on my system - if I open System Settings → Display and Monitor → Display Configuration, I see that my second screen is still recognized, even when it is off.
It could be that on your system - the display configuration removes the display when the screen is off, and that may explain the behavior. can you please check?
So, you have only one screen on your system and you turn it off from time to time? I don’t think that’s a use case Plasma developers have tested.
The idea is that if you turn off your “primary” screen, then Plasma needs to move the main panel (that lives on the primary screen) to the new primary screen (screens have priority, and the “primariest” active screen will show the main panel). If there’s no primary screen - I’m guessing the behavior isn’t well defined.
I think you should open a bug about it in bugs.kde.org. Please link it here so I can follow up on it.