After several hours of debugging, I was unable to fix the issue.
Even after re-enabling the weapon, it only fires when aiming southwest. In all other directions, it does not fire.
This is similar to the issue with drones: the code technically works, but the result is flawed without throwing any errors.
At this point, only Jip can help.