code: def disable_busy_cursor():
      
      while QgsApplication.instance().overrideCursor() is not None and \
              QgsApplication.instance().overrideCursor().shape() == \
              QtCore.Qt.WaitCursor:
          QgsApplication.instance().restoreOverrideCursor()
docs: Disable the hourglass cursor and listen for layer changes.