Most EMTB's do not have brake sensor cables.
Some of the cheaper bikes used to have them, some possibly still do, generally where they ran hub motors and didn't have a torque sensor in the crank, but a position sensor which would detect a revolution. Therefore there would often be considerable motor over run to accomodate for people with really slow cadences - or the motor would cut out all the time.
The brake sensor then tells the motor to stop when you brake.
Mid mount motors have torque sensors, so they know how hard you're pedalling and exactly when you stop.
Overrun is a common feature on most motors though and depending which mode you are in will often influence how many milliseconds overrun you get. Overrun is an intended feature, you use it to pop over a log/rock without having to pedal and therefore avoid a pedal strike. The Bosch CS Gen4 Race in Race mode has a considerably longer overrun than the normal version of the motor for this purpose.
1-2 seconds does sound really long though. A few Brose motors used to run on this long and it was a faulty torque sensor. I think
@patdam was suggesting you can adjust this. Maybe have a search on the forum for the Besst tool. (Bafang configuration software).