How to properly bounce this ball

You could use raycasting as an alternative collision detection technique. This could solve the issue if the ball get’s stuck inside as raycasts cannot hit a part if the origin starts from inside the part.

The d normal of the ray should equal to the velocity of the ball which is the Vector3.new(speedX,0,speedZ)