Unity: How to fix collision detection with fast moving objects in 2D?

I was making a simple pong game and it worked fine until I tried to increase speed of the ball. With increased speed ball moves across the walls occasionally. I've set no rigidbody for walls and dynamic rigidbodies for players and the ball. Surely, all of them have colliders. I check collision with OnTriggerEnter2D and all colliders are triggers. How can I solve this problem besides just hard coding collisions?

• How do you move your ball at present? How are your walls set up? – DMGregory Apr 3 at 15:12

I found a solution! In order to get a proper collision detection you should use Kinematic body type in Rigidbody2D properties and move the ball with Rigidbody2D.MovePosition in FixedUpdate instead of transform.Translate in Update method.