ESPHome doesn't change to unavailable for long time

I make a sensor with a D1 Mini. The issue when I power it down (unplug the power) the binary sensor state remains its state (on or off) for a longer time (around 1 minute) before it changes to Unavailable. Is there any solution to see the sensors Unavailable nearly immediately in case of power outage?