After several attempts to get a sim card and insert it back, the error disappears, but after a while it reappears.
I cleaned the sim card reader. Then I changed the sim card reader.
Updated to Android 9. The problem is not solved.
Put sim cards of other oprethors - nothing helps.
Empirically, I found out that the SIM card does not fall off if you turn off geolocation.
After turning on the geolocation, after some time the problem returns.
How to solve a problem?