Ah that’s going to be tricky – is moving away from Material Design’s form fields out of the question?
I say this because on top of the problem you raise, float labels have a load of usability issues.
If you’re particularly interested in designing forms that are easy to use, check out Form Design Patterns published by Smashing Magazine.
I cover all these things and more in lots of detail. Sorry to plug my own thing, but poured months into it and it genuinely might help you.