Go to the BP_PlayerInventory and open the CloseInventory function, then tick on the Flush Input option on the Set Input Mode Game Only node.