To salvage the wine left with the lees, transfer the final bit, sans pulp, etc., into the most appropriate sized container you can, seal it and put in refrig until it settles out. Then transfer the wine into the carboy or wine bottle with airlock, use it for topping up, etc. I actually have 1L-2L-3L cheap PET soda bottles that I use expressly for the clearing in the refrig. The lees fill and settle into the feet. But you can use mason jars, wine bottles, whatever.
As far as racking with minimal loss, you really get better at it as you get more experience.