Go to BP_BuildingPlan then create a new variable called ClearonRightMouseDown and set the type to Boolean and tick instance editable. The default value is false.

Add the highlighted nodes shown in the image below, location at the top of the image.

If you set Clear on Right Mouse Down to true in the class defaults when the player clicks right mouse button it will deselect the current build part.