I Had the problem with a surface pro 4 after cleaning partitions with AOMEI Partition Assistant. It wouldn't load windows 10 or boot back to the USB partitioning tool
I fixed mine with the following:
I used the surface pro's port replicator with a USB keyboard and mouse plugged in as the surface keyboard inst recognised.
A recent copy of Ubuntu http://www.ubuntu.com/download/desktop
A copy of Rufus to build the USB drive https://rufus.akeo.ie/
I turned off secure boot, TPM and set the USB service to be first in the boot order. I'm not sure if these steps are necessary but I did them before I fixed it.
Use Rufus to turn the ISO into a UEFI USB install
(ensure Partition scheme and target type is set to GPT Partision scheme for UEFI)
Boot with ubuntu USB drive plugged into the surface.
Install Ubuntu taking over entire disk!
After the install, shut down the surface, reset the UEFI settings for TPM, Secure boot etc..
Boot from your UEFI windows installation / recovery media
Took me best part of four hours with many Linux distros, versions of windows, even more frustration and swearing.
Hopefully this helps someone!