Using ICICI bank iMobile you can create a random UPI id totally unrelated to your phone number I agree with the problems you mention, and in general there is an increasing trend of taking phone numbers of customers in India, e.g. once at a Nike store, I was told the purchase couldn't be complete without the phone number.
I refuse to give phone numbers and usually the cashier will enter their own fake phone number to let the system proceed further. Some shops like decathlon tried to force us to install their app, create an account and then scan and pay through that – at the cashier counter. I just left the entire shopping cart there and walked out without purchasing. Such crazy things do happen but those companies will learn the lesson quickly as Indians are quite savvy about these things.
I do the same but in this case I had already made the payment and they refused to give me an invoice without a contact number, and I didn't have any interest in a confrontation. If I had not made a payment I would have simply walked out.
Next time, tell them that the Union Minister of State for Electronics and IT has said that people shouldn’t give their phone numbers at retailers if there’s no justifiable reason. [1]
If they refuse to give an invoice, tell them you’ll report them for GST evasion. [2]