I knowingly punted on trying to attain enum compatibility between PyQt5 and PySide6 with plugin_utils.
I agree with Kevin here. No need to get overly clever/complex for one enum. You could check to see if PySide6 is already in sys.modules rather than try/except, but there's no real advantage either approach would have over the other in my opinion.