The best way to do this afaik is this max thing paired with a 0 sat withdrawal invoice.
Wdym with 0 sat withdrawal invoice?
reply
If you create a 0 sat invoice from the (lightning) wallet you're receiving to, some sending wallets allow you to send out all the sats.
reply