Failsafe enable:No global position

I’m performing HIL on Pixhawk 6x using the PX4 toolbox on MATLAB using jmavsim. When I run my custom controller, after a while QGC says:“Failsafe enable:No global position”. Why does it happen? How can I fix it?