When the car is off or the system loses power, the master cut valves return to their open position, and the brakes are pressurized manually, like an old car without power brakes.
This is "brake-by-wire" to everyone, except apparently you.
If there's a failure of the electrical supply to the brake ECU, or another fault condition occurs, various valves then revert to their normally-open or normally-closed positions to allow hydraulic pressure from the pedal through to the brake cylinders, and isolate the stroke simulator.
Because the engine isn't constantly running and providing a vacuum that can be used to assist with brake force, the system also includes a 'brake accumulator' and pump to boost the brake pressure.
Reference: https://pmmonline.co.uk/technical/blue-prints-insight-into-t...
I don't know for certain, but I would assume that other hybrids and EVs have similar systems to maximise regenerative braking.
So even if the electric system fails completely, you can still actuate the brakes.