Try tapping F8 on booting to get to the advanced options menu. If successful try the last known configuration option. If that fails, restart, keep tapping F8, then select safe mode. If you get to the stark desktop, find system restore and restore to before the problem.
Surface Pro (2017) vs Surface Pro 4