iOS 17.5’s Find My app lets you put your iPhone in a repair state so you can send it to Apple for service without deactivating the Activation Lock feature.
iOS 17.5: Repair State lets you send your iPhone to Apple for service without turning off Find My and Activation Lock