Disable the selection box in the editor scene

Iam working on a tilemap editor. The editor itself is working fine and i already made sure you cannot select the tilemap (by locking its layer) but unity still draws a selection box which i dont want. Is there a way to block this without blocking everything else? I used to do something like this:

    GUIUtility.hotControl = controlId;

But then it blocks alot more than i just want it to.

After much fiddling around i came to the conclusion that the most simple solution works. When i do this: GUIUtility.hotControl = 0;

It disables the selection box you get in the scene but it still enables you to move the editorwindow around. Yep it seems to work just fine but it doesnt make much sense to me.

Now iam expecting somebody to scold me for misusing unity. If you are that guy please do so and teach me how to do it properly.

EDIT: This seems to have other nasty side effects

if you have probuilder you must click on the cube icon which is the left one on the object to use terrain and such and this will not use the selection box when editing the object and scene took me forever to figure this out hope it helps