Consider a positive charge of charge q placed in between plates which are charge with charges opposite in sign and equal in magnitude.A uniform magnetic field is present downwards in the right half of the midway between charged plates then charge slowly accelerates and after reaching the right half,the charge deflects and gets out of the electric field produced due to charged plates but magnetic field is present even outside the plates then charge further deflects and comes in between the plates and it starts accelerating again.this process repeats and the velocity keeps on increasing. Here work done by magnetic field is zero.Charge in the plates remain constant ensuring constant electric field between plates.The ball is gaining kinetic energy continuously.Where does this energy come from?The charged plates are kept between rigid walls to stop movement of plates due to force.The image of this situation is given below.
The magnetic field may do no work on the test charge, but the electric field does.
I assume you understand what's happening if you only look in between the plates (because there the electric field is constant). If the charge gets closer to the negative plate, it gains (kinetic) energy. If the charge moves further from the negative plate, it loses (kinetic) energy.
Now, when you leave the area between the plates, the specifics of the field are messier, but it's not sharp boundary between a full-strength field inside and zero field outside. The field becomes weaker, but is still present. If the particle can gain $E$ energy by moving between two points between the plates, it will require $E$ energy to move backward even if you pick a path that is outside the plates. The field there might be weaker, but your path will be longer. Together, it will sum to the same value since the electric field is conservative.
You're not correct saying that the charge is constantly gaining kinetic energy. Any motion towards the left reduces its kinetic energy because it gains potential energy. Further, if the charge doesn't come in exactly perpendicular to the left plate, then it will be deflected to the right plate at an angle this time, and eventually the charge will collide with the right plate.