Sorry to unearth this ancient post, but it’s the only one that came up when I searched for a solution to this problem, and to save anyone else wasting their time looking for an explanation for this behaviour I’m replying to this post.
I’ve just encountered this problem in 4.24.
It’s due to the setting Auto Manage Active Camera Target in the Player Controller being set to true. This is also the setting that causes the player controller to find the player camera when the level starts as if it is set the pawn calls AutoManageActiveCameraTarget(GetPawn()) in OnPossess.
When OnUnPossess is called on the Player Controller, it calls SetPawn(NULL), which causes this little snippet to be run
Overriding whatever view target you’ve set. If you have a separate auto managed camera it will use that, otherwise it will use the Player Controller as the view target. In the above post this seems to be located at origin, while in my case it was located at the player pawn, but with a weird rotation, neither of which I wanted.
I fixed it by overriding the Player Controller and setting Auto Manage Active Camera Target to false, and from Event BeginPlay setting the view target to the controlled pawn. This retains automatically setting the view target to the player camera but removes the weird camera behaviour when the player pawn is destroyed.