"ON ANY RUNWAY" variable not always work

Hello, I am using the “ON ANY RUNWAY” variable to detect when I am on a runway, however, when performing several tests at different airports I have detected that it does not always work. Sometimes, I enter a runway and it keeps returning “false”.

Does anyone know if it is broken or if there is some other way to detect when I am on an airstrip?