By looking at your gun sprite, it seems that it is not properly aligned for rotating. You need to import your sprite aligned from West to East (Basic game making concepts - What you need to know to start with GDevelop - GDevelop documentation). Only then the engine will rotate it in the intended way towards your mouse position. I would also, as Mirquiso suggested, create a specific point for the bullet to spawn instead of using the origin point.
In any case your gun sprite should look like this by default: