grbl 1.1 won't return Mpos status

I am using Xpro  V2 cnc controller and when using python to send G codes some time it responds with the proper message where it includes MPos M/C state etc and other times it only responds with ‘ok’ although it suppose to send realtime m/c position.

Obviously this is casuing enourmous problem instead of waiting in position it just flys to next position issued by the program. The python program only sends 1 move instructions at a time using only one axis

here is the partial code

while True:
x =ser1.readline().strip().decode(‘cp1252’)
xMsg = x[x.find(’<’)+1:x.find(’|’)]

if x[0] != ‘<’ and x[0] != ‘o’ : continue

if xMsg==‘Idle’ :
if(1200-z!=MC_POS): continue
elif xMsg==‘Alarm’:
QMessageBox.warning(self, ‘Warning’, “Something went wrong\n Reset the MC”)
elif xMsg==‘Run’: continue
print('XDRIVE - ‘+L_bytes+’ '+x)

Hope there is a solution