I can only go off my own experiences - which are a mix of getting my hair professionally coloured and doing it myself for the past 30 years.
I have been to salons where they've applied foils and colour (using a brush) to freshly washed hair (which they've done), and the results have been lackluster. On the occasions I've been back to complain, I've been advised to wait a few months for it to fade, then return with unwashed hair for them to re-do it (which they've done without washing first).
On the packets I use (normally L'Oreal), they always say to apply the colour to unwashed hair (and that's been blonde, brown, red and everything in between).
This advice from L'Oreal explains:
Unsure whether it’s best to dye clean or dirty hair? Let’s find out. Explore everything you need to know about washing your hair before dyeing it.
www.lorealparisusa.com
View attachment 1287120
The in-salon treatments I mentioned in my post above are usually something like Olaplex or KMS, which encourage the colour to look its best.