If you use Brave as your browser and you're also using a Surface Book (or some other Windows detachable with multiple GPUs) then this message is going to spoil your detaching fun:

Please resolve before detaching
The following may need to be closed in order to detach.
Any unsaved changes will be lost.

So why does it happen?

By default, Brave uses the primary GPU which is the one in the base and as it's dependent on that while running then Windows won't let the screen be detached from the base.

And how do I fix it?

In short, tell Brave to use the other (power saving) GPU instead.

In a bit more detail:

Open Settings > Display > Graphics.

Settings > Display > Graphics

From the Add an App dropdown select Desktop app and click Browse, navigate to the brave.exe executable, and select it. By default, it'll be at C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe. Now click Options on the Brave Browser card that's added to your options.

Finally select Power saving, save everything and restart Brave.

And now you can detach your screen without closing your browser and as an added bonus your laptop should run cooler and the battery will last for longer too!