Random Yaw in Land function (Gazebo simulator)

Hi There.

I am trying to simulate the Mocap system positioning in Gazebo simulator, before implementing it in real life scenario.
To achieve this I use the default Gazebo simulation described in PX4 guides (make px4_sitl gazebo).
I wrote a Gazebo Client program, that takes subscribes to position data of iris uav in the simulator, and the I send this data as VISION_POSITION_ESTIMATE messages to the simulated UAV.
My test scenario is, Arm → Takeoff → Offboard → Land.
In Offboard mode I can set target position to fly to using the set_position_ned messages, and it works ok for now. (Although I would like to know how to increase the EKF reliance on vision position data, which is more reliable than GPS).

My problem is with takeoff and land commands. I use the functions provided by MAVSDK, and the seem to be acting weird at time, and I cannot tell what is causing this behavior. When the drone enters Land state, it immediately yaws to one side to about 45deg and yaws back, all while landing.
Hopefully this can be seen in the logs:
In the Yaw Angle graph, there is a step Yaw FF Setpoint, and I do not know what is causing it.

Similar situation can be observed here:
But here during Takeoff the drone spins full 180deg (most of it being on the ground) before taking off.

Maybe someone can point out something I am missing, or has encountered something similar?