Plaban Kr. Mondal ,
I'm not able to see "weird" behavior that you mentioned.
probably using requestAnimationFrame instead of setInterval can solve your problem.
For rAF you need to modify code as follows :
requestAnimationFrame(drawTheBall);//call rAF within function.
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = ball.color
ctx.arc(ball.x, ball.y, ball.radi, 0, 2 * Math.PI)
also remove setInterval(drawTheBall,5)
by this you are actually trying to call drawTheBall function 200 time per second!
because speed of ball along Y axis is random and random is not same always. that's why it's sometimes fast and sometimes slow.
This is line 17 :
let vy = 2 + (Math.random() * 10) //movement in y axis
of this code