How can I receive custom Enhanced Input actions when the debug camera is turned on?

I want to be able to quickly exit the debug camera via shortcut keys after toggling the debug camera. So I created the corresponding Enhanced Input action. However, even though I obtained the Enhanced Input Subsystem on the debug camera controller and added the corresponding mapping context, my input still wasn’t captured.