At random times Plasma session restarts

Did you check this 2 issues under Known Issues?

You can also complettly skip SDDM when you want to restart/shutdown… this evades problems too.

System Settings>session>log out screen: shown, mark it unselected.

Additional i can recommend to remove splash screen also:
System Settings>Colors & Themes>Splash Screen>None

Most Important for you, right now since you face this issues:
System Settings>Screen Locking:

Lock Screen Automatically: Never (You may just want to adjust this Value, if the Lock Screen is important to you, but disable the Lock after sleep should solve the most pain, that you face right now)
Lock after waking from sleep: unchecked.

Less features, less bugs = more stability.

That said, if the first 2 work around’s cure your problems, you may don’t need to disable this SDDM Features.