I've been having this problem for the last few weeks with my Surface 3 Pro. Coincidentally I changed from a SP3 keyboard to a SP4 keyboard about that time. Don't know if that is related or not but usually when I encounter the problem I see it after putting
it in sleep by simply closing the keyboard.
But the last few days I've found something that works for me. Kill Edge before folding it up. Since I've been doing that I haven't had it occur again. Note that I tried to reproduce this by simply opening Edge and putting it to sleep but it didn't happen.
It seems that when I use Edge during my normal workday I accumulate several open tabs and I'm guessing that at some point that causes Edge to become unstable.
Anyway, something for others to try and see if that helps.