You could do it by draining completely I suppose, after all that is effectively what you do when you have to replace a lever, hose or caliper (or a much smaller cheaper part in the case of most other bicycle brake manufacturers 👿 )
In practice, (if you bleed it like a car from the top down and out the bleed nipple), the amount of brake oil left in the caliper is really rather tiny once you have retracted the pistons and put the bleed block (or a 10mm allen key) in. This means that the impact of mixing of old and fresh oil really is minimal: a tiny bit at the top as you begin topping up the reservoir with new oil, and a tiny bit at the bottom as the fresh oil pushed out out the last of the old oil.
If it was me I wouldn’t bother draining and then refilling, just pushing out old oil with new will be fine.
PS why does the oil need changing? Mineral oil brakes can go far longer between fluid changes than DOT systems, as long as they are working firmly and properly. A friend has my old deore 525’s, and the rear one has never been bled or anything in eight years, and it still works very well indeed.