NO ROOT MIUI OPTIMIZATION
To make the MIUI optimization option appear:
Go to Developer settings, scroll to the bottom, tap on Reset to default values 4 times in a row.
If the "Reset to default values" option is grayed out:
Go to Settings > Additional Settings > Languages & input, then Autofill service, set it to Google. Now you can go back to Developer options and the Auto-fill section will be enabled.