I had this exact same issue. for me the resolution removing/cleaning/reinstalling the brake pedal switch of all things.
Did resets/took to dealer to no avail/...until I read about the brake switch issue.
No problems since then.
YMMV as to if this is the root cause of your issue.