When Alaba and Lucas were the CBs, it would be difficult for Alaba (RCB) to operate at the right side when the CBs spread out after fullbacks go up the pitch. Therefore, Pavard, who is right footed, stayed back and Alaba operated centrally.
During the second half, Kimmich, who is right footed, was the RCB. Therefore it was much easier with to build up with a back 4.