This is very strange, and i don't think what you did is what fixed the problemI ended up fixing my problem.
The problem was xiaomi account with the xiaomi cloud enabled
What i had to do was revert back to stock rom. Sign in with my xiaomi account and xiaomi cloud. Go on my computer and log into the xiaomi cloud and remove the device from the xiaomi cloud. Then after an hour i signed out of my xiami account from the phone and factory reset.
Then installed lineageOS and i did not have that problem anymore.
I installed different simcards and even without a simcard and it does not freeze.
It seemed the xiaomi cloud locked my phone to that specific sim card.
What i don't understand is since i erased the stockrom is where does it save this information to lock my simcard? I thought the lock settings would be saved inside the stock rom.
Anyways everything is good now. It seems strange how that worked. Make sure everyone to sign out of your xiaomi and cloud before erasing the stock and installing lineageOS
if you did a clean flash with wipe system vendor + format data this shouldn't happen ...
if you mean SIMLOCK it's stored in the sim itself (can be removed with security option)I'm no expert, but I reckon it was recorded somewhere in the vendor or persist partitions...
persist does not have this kind of info
vendor (if not wiped during the flash) get overwriten with the rom vendor img