Navigate to the BP_PlayerInventoryComponent then to the Move Item function then to the check stack type collapsed nodes and add the nodes shown below
Then in the move item function go to the move item to empty slot collapsed nodes and add the following nodes shown below