PropertyValue(“App.MacOSXAppName”) doesn't update (Ventura, Xojo 2019R1.1)

I found a workaround - add a sleep() command in the shell after SelectWindow():

SelectWindow(2)
DoShellCommand("sleep 1") ' this prevents the next line from failing in Ventura
If PropertyValue("App.MacOSXAppName") <> "MyHelperApp" then
...