Hello!
Sorry for the late response.
I actually had stopped working on this after posting, and only got back to it today. Actually, this problem also occurs if I use, for example, the mocap data, the issue seems to occur when there is no global position estimate (no GPS data).
I have not solved it yet, but I was searching again and I believe that this should be solved by #23845#23845. This was not merged yet though. I will try to apply these changes to a local version of PX4 and test it. I will get back to you with an update once I test it.