I feel Apple has neglected it's customers in this case.
During upgrade to the new iOS, they should detect the replaced sensor and issue a warning to the user that the phone should not be considered as a safe device anymore. Maybe even re-issue this warning every week to remember their owners.
When a replaced sensor is detected AFTER the upgrade (i.e. after an original sensor was detected previously after the upgrade), then Apple can take more serious actions (I leave in the middle if bricking is the right solution). Yes, it will affect 3rd party repairs, but not their customers who repaired their phone for a more reasonable price in good faith.
Sorry Apple, you could have made this upgrade much smoother for your customers but you willingly choose not to.