This developer has a pawn walking, and a pawn flying. There is a IMC (input mapping context) for walking and an IMC for flying. There are BP nodes to add and remove the IMCs, effectively switching between them.
In your case you would have an IMC for pawn locomotion, and a separate IMC for placement.