Check your third brake light and see ifs its on when this happens.
Mine stays on, meaning the car thinks the brake is being applied.
I have to tap brake few times to make it properly work again.
Had this problem for a while. Taking my car in this Thursday for checkup.