There is no such thing as a mouse position to a raycast (directly).
I mean, you have ScreenPointToRay, as in your code. That can use the mouse position to create a ray, which you can use in a raycast.
This may confuse other readers, but… if this is still about your “dead zone” area, and you are still stuck, can you attach a small repo of a very simple scene with your setup?
I’m sure I could help ya fix it…
Specifically, if you want the deadzone or you only wanted that because of the button/shoot interference**.