Turns out my code was wrong, it’s get_tree().get_root().set_input_as_handled(); but I have a better solution for you.
func _input(event: InputEvent) -> void:
if event.is_action_pressed("drop_stack", false, true) and is_in_valid_slot:
InventoryManager.trash_stack()
elif event.is_action_pressed("drop_item", false, true) and is_in_valid_slot:
InventoryManager.trash_single_item()
The false leaves the echo setting at default, and true is for exact_match. This should solve your problem even if you allow remapping with Shift.