This can be reproduced very easily with the attached script, which just imports gtk and sleeps. Importing gtk makes it register to at-spi, but since it doesn't run the gtk loop, it doesn't answer at-spi requests.
Samuel
#!/usr/bin/python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk import time time.sleep(60)