Newer iPhones come with software locks that prevent the use of the cameras should replacement parts be installed instead of factory originals. Now, there are rumors that Google has done the same with its 2021 flagship, the Pixel 6 Pro. A famous independent-repair blogger has investigated these claims using 2 new units of this phone.
https://www.notebookcheck.net/A-Google-Pixel-6-Pro-teardown-video-offers-encouraging-insights-into-the-device-s-repairability.577776.0.html