Read back over the comments, some people appear to be frustrated by the issue.
You on the other hand, have made three comments:
Firstly you stated:
"I have been facing the same issue with my iPhone 12. Its lock screen sound and keyboard typing sound dims or gets low when idle but when i start typing or doing something it goes back to normal".
You then jumped on a comment made by xia91928 by saying:
"This has nothing to do with the magsafe as I am using it without the magsafe case or charger. The sounds include lock sounds and keyboard clicks. They are reducing which has been the issue for me since I opened the box and not because I had magsafe. I am now wondering whether I should go back to my iPhone 11 because at least it is not annoying me when I lock or type it".
Finally, you felt it appropriate to jump on my comment by saying:
"With all due respect nobody is consumed with this. It is just a discussion where everybody is sharing their problems and solutions. So lets not connect this to something which is unrelated like first world problems or third world problems. Your given solutions are not helpful at the moment".
I never stated that people were consumed by the noise issue, I said "don't let this consume you, its a first world problem really".
Apart from unhelpful retorts, what have you offered in this discussion.......absolutely nothing!
If you're not happy with your iPhone then consider one of the options I gave, or do what r_saini suggested, which was to turn the sound off.
Hopefully you'll find something that makes you happy.