Except, if I read his last post correctly, he immediately cycled the power and it did nothing. If it was purely electronic, that should have resolved it. It seems something else is at play here and it isn’t purely an electronic issue as it appears time is involved in the resolution also.
It could require capacitive discharge time
Not saying it isn't mechanical in nature but it seems to have an electrical component or the key would have no effect. Probably the rear control circuit
I think we need to know that missing bit of data, is the servo motor running? At least that would point us in some direction.
The steps I would take to isolate it further when in the failure mode are,
1. When it happens, stall the bike and listen for servo noise.
2. Raise the bike on the center stand if capable and see if it is centrist to front or rear ( yes, they are integrated so is it one or both wheels. )
3. Verify that at key off, the wheel(s) do release and not before.
4. Replace all lines and flush thoroughly if still OEM
5. Check the rear pedal adjustment to make sure it has proper free play and is not closing off the replenishment orifice.
6. Check rear brake switch adjustment and function.
John Zeiler, is the brake switch what energizes the servo motor or is it a pressure transducer or both.