If an iPhone’s display has been replaced by an unauthorised or non-genuine service provider, features such as Tap to Wake may not work consistently or reliably. The replacement display may not have the same quality, touch-sensing characteristics, or compatibility as the original Apple display.
Tap to Wake depends on the display and touch-sensing hardware working correctly with the iPhone’s software and other sensors. If the replacement screen is of poor quality, improperly fitted, or not fully compatible with the device, you may experience intermittent response, delayed waking, missed taps, or Tap to Wake working only occasionally.
Therefore, before assuming that the issue is a software bug, it is important to check whether the iPhone has had a display replacement and whether the replacement was performed using a genuine Apple display by an authorised or properly qualified service provider.