You will be well served with either decision. Here are some considerations if favor of each; The G21 was my duty weapon before retiring. We had training G21.3's with well over 300K rounds and counting. They have hundreds, sometimes thousands of rounds put on them weekly. So longevity and durability is no issue with them. It's striker-fired just like any other Glock the HK is hammer-fired. As far as the HK45, it is very likely going to have the same longevity/durability in that you'll likely never shoot it out. It may be more comfortable in it's ergos and such. The G21 can feel like a brick in your hand depending on hand size. The HK, imo, is going to be a lot more comfortable.
I faced almost the same decision a couple of months ago. I was leaning towards the G21 becase that's what I've carried for nearly two decades. However, I came upon a deal for an HK USP 45 that I couldn't pass up and I'm glad I did. For me personally, I much prefer hammer-fired pistols. I prefer thumb safety/decockers. I like the ergos better than the G21. And the HK is strong enough to shoot 45 Super without mods which is not true with the G21. The G21 can be converted to 10mm which is a bonus option whereas the HK cannot without some serious modding. However, the ability to shoot 45 Super straight from the box kinda eliminates the 10mm conversion 'disadvantage' somewhat. The HK45 from what I've learned can also shoot 45 Super on a limited basis without mods. Put in a stronger RS and it's good to go for more extended shooting from what I understand.
Either is a good choice and will boil down to what you prefer. I'm very happy with the HK and I'm glad I chose it over the Glock.