I made some changes:
https://www.dropbox.com/s/f5r5tcmm04pna27/BounceBall2.capx?dl=0
Bullet angle is unreliable, so I added BallAngle instance variable and changing it with events.
Bullet angle of motion is set to BallAngle on every tick. "Bounce off solids" is now disabled.
Thank you so much for your help, it's working perfectly now.
However if I clicked the mouse at the same time the ball hits one of the vertical walls the ball would go through that wall or it would bounce back to the same way it came from.
Do you think you can fix this?