If you only need to change the color of the label when the field is empty, you can safely use the standard label props, which are less likely to trigger the bug.
<TextField
label="Enter your name"
InputLabelProps={{
sx: { color: 'blue' }
}}
/>