Dynamical approach to MPI in W+dijet and Z+dijet production within the PYTHIA event generator