Separation of muonic and electromagnetic signals using the upgraded detectors of the Pierre Auger Observatory