Hey, I made my version of this game just a few days ago! But in my game the ball is bigger and moves slower, so I don't have this problem
Try to make walls thicker, add the second line of defense.
Remove "Ball on collision with wall -> bounce ..." event, instead add Solid behavior to the walls.
Even after that when I left the game running for 10 minutes, the ball managed to escape.
I would add another sprite in the top left and top right corners, just outside the layout. If the ball collides with that sprite, you will know that it has escaped, and you can return it into the layout with something like this:
Ball Set position to (10,10)
Ball Set Bullet angle of motion to 45