This works around several bugs where tooltips don't close when expected. Fixes: https://github.com/pybricks/pybricks-code/issues/275