why dashboard sometimes show shift stick stack in P or R or stays empty on 2002 Mercedes-Benz S430

Can move shift stick, but when driving no shifting in other gears.Dashboard shows some errors,brakes got softer,some clicking next to shift stick when press a brake Take battery of wait and everything get back to normal.Sometimes on dashboard stays in P or R same thing,I can drive no shifting.Sometimes leave a car parked everything restart by its self.

Asked by for the 2002 Mercedes-Benz S430