got the Mi 13 Pro which has the same sensor, and it makes the rattling sound, i thought it was something loose but i never dropped the phone.
apparently it is the camera lens, when active, it barely makes any noise.
I switched from iPhone 12 pro max to xiaomi 13 pro, the data migration process was quite stressful (I lost some data), but apart from that it's been a good experience so far.