RTS selection box with panning camera

I’m having some problem getting the selection box of type RTS, drag mouse and select units, working with a panning screen. The box is “locked” to the screen resolution when I use Input.GetMousePosition to get the first corner of the selection box and the box follows the camera while panning. What I would like is it to be achored to the world somehow while I drag the box. Making it possible to keep dragging and expanding the box while panning the screen.

Ran into the same issue. Did you solve this?