Have you tried debugging and stepping through the code on the PC that has Outlook 2019? It might be as simple as a method or object was changed in Outlook 2021.