I also had this issue (more than 10 times a day) a couple of months back. Fortunately, I haven't had this issue for more than 4 months of using my Surface pro 5 i5 8gb with 256gb.
List of things that might have had triggered the solution:
1- I now mostly charge my surface pro using my docking station. The problem also doesn't show up when occasionally charging the surface with the OEM charger. The problem used to be more frequent when using an aftermarket charger bought from amazon. Today, I mostly let the battery drain before reaching the dock charger.
2- I rarely attach the pen to the surface.
3- I factory reset the surface once every month.
4- Bluetooth is most of the time turned off and was replaced with a Logitech USB dongle mouse. I had a Bluetooth connected mouse before when the issue was present.
5- Inking feedback settings is turned off.
6- Battery is always set on Best Performance.
7- Brightness always on 100%.
I understand your frustrations. A year ago I gave away my surface pro to my younger cousin and got a macbook pro instead because I couldnt handle all the little nuances the surface had. Fast forward a couple of months and after using the macbook pro as my main, I decided to go back to my surface because how else can you appreciate something without it gone. Strangely, after taking the surface back, the mouse freeze issue was gone.
Go ahead and ask me questions about my configuration in case it will help you troubleshoot your triggering event.