after 2 days of looking for a fix for the problem i finally found out what is causing the problem and fixed it.
i simply unticked the use pawn control rotation from the camera properties and ticked it from the spring arm properties instead and the problem got fixed