OK I found a way to fix it, following the next steps:
- Installed xiaomi eu rom 9.1.17 (which was the last version with working mobile data for me)
- Configured APN normally, so far everything works
- Download build 9.3.1 and installed it without wiping
After doing this, mobile data works perfectly on the newest version.
Maybe a bug when adding new APN's?