I don’t know the solution to this particular issue, but just in case anyone here is interested, Telegram now lets you log in with Passkeys, so if you already have an account, you don’t need to rely on SMS.
This would be especially beneficial for those who are in regions where users are asked to purchase Telegram Premium for one week in order to receive the code.