2nd controller works in PIE but not in shipping build

Just to make sure that I understand your problem correctly. You have two pawns, each controlled by a different playercontroller. You want that Player 1 uses the keyboard and Player 2 uses the gamepad.

Are you using splitscreen? If so you just need to check this bool.