In general running apple scripts every that often (every 0.1 seconds) can be problematic. Usually it doesn't break but it can cause delays and very high cpu usage.
You could try replacing the if with BTT's is app running function
tell application "BetterTouchTool"
set isRunning to is_app_running "SysPref AntiAction"
if isRunning then
else
end if
end tell
What is the script result if you run the script in BTT while system settings is active? (you can run it without activating BTT by cmd+clicking the run script button)
SysPref AntiAction is a small app that I have done. It allows/deny to other apps/scripts that I have done to make changes in System Settings while this is running.
Before starting the thread I tried higher repetition time (0.5 and to 1 sec), but the problem was not fixed.
I didn't know the trick of cmd+click, thx!
The script result is correct, but the floating menu is not updating. Here you can see the floating menu in red with the text NOT RUNNING, while the script result is blue and text is RUNNING (delay time is 0.5):