Hey Martink,
There are a couple of things that could be causing this sideways movement on the forehand. Firstly it could be that your feet are too square (Your right foot, if you are right handed, is not far enough behind the left) causing your weight transfer to go sideways not forwards, so look out for that one!
The second one thing is that when preparing for the shot on your forehand or half long ball you aren’t getting the weight onto your right leg enough, causing this leaning and sideways movement. Try to focus on the weight transfer happening together with the backswing of your arm as well as good body rotation.
If you aren’t rotating the body back or taking enough backswing its difficult to make the energy of the stroke to go forward. Give those tips a try and I’m sure you’ll see a difference!