You cannot partially undo a receipt line.
You could undo the whole quantity of 1, but since you have partially invoiced the line, the only option is to invoice the rest and create a credit memo for the remaining 0.5.
This is one of the many problems you'll have with decimal quantities. Better use units of measure and work with integers in Business Central.