How to set up Enhanced Input for APlayerController in C++?

Yes, there is functionality associated with managing multiple characters and pawns. I think the controller is the perfect place to do this because it’s not convenient to store this functionality in a single character. The first version of my code worked exactly like this, but there were problems when switching to UE5.2.