Prusa i3 MK3S Filament Sensor rev. 0.4 and FW 3.9.0
In the latest firmware release (at the time of writing this article) Prusa Research added a feature for filament sensor recognition (available for i3 MK3S only). Essentially the printer can tell when then filament sensor is disconnected and can interrupt the print and wait for user action. More details can be found in their GitHub