Playing the game, I've noticed the potential of those mistakes happening, but I soon learned to be patient and find good spots on my target that don't twitch a lot or use free shoot and shoot behind my target, making sure that said target remains an obstacle for my shot.
Also, for the 2nd point, always make sure you deactivate an ability if you decide not to use it and you should be fine.
Now, these are my own ways of getting around mentioned issues, which turns them into minor inconveniences for me that I just glance over, but I understand that it would be a decent idea to fix these issues with better hitboxes and layer priority.
I just don't think these are too high on the priority list for Larian at the moment.