After opening web inspector and detaching it into seperate window (using the detach button on the top left), it can't be closed with Cmd+W shortcut. Safari does this and I think it's a good idea to replicate that behavior.
This is related to this issue but I decided to create a new one instead of replying since it's too old and already closed.