In order to make MC to change working directory upon exit, you need to modify ~/.bashrc (or /etc/bash.bashrc, called from .bashrc), as detailed in its manual page, mc(1), under the -P option. [ 13]
~/.bashrc
/etc/bash.bashrc
.bashrc
mc(1)