It throws MissingReferenceException: The object of type 'UnityEngine.GameObject' has been destroyed but you are still trying to access it.
from at ./Library/PackageCache/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs:476)
here is the code from InputSystemUIInputModule, line 476:
@MaskedMouse has right propagation null propagation operator are not compatible with GameObject(cf UNT0008).
This bug has already been reported ISXB-1081 and the fix will be included in the next release.