Check the settings in the app.
There is a setting about the obstacle avoidance that has options on what the aircraft does.
One of those options has a slider switch to cancel the left, right movement so you can fly a straight line.
Perhaps that got switched?
Good luck. ?