Remember that each and every shot requires strict adherance to the fundementals. Consistent shot to shot sight placement and trigger control is key. It doesn't take much to put you off that little bit. I've always liked the picture that HK sights provide.
With the HK, I would say that more than likely you are influencing the gun and pushing it left(presume you are a righty) Check your trigger finger placement and put a tad more on it. If it's not that, it's the sights-unlikely with the HK.
The Glock seems to be nothing more than lack of concentration with the sights/trigger, maybe a tad high front sight on a few.
Since we don't know what distance you shot at it's hard to say that you are in the accuracy threshold of the pistol/ammo combination. I will say this, both are capable of putting those shots inside a 3" circle at 25 yards. Also remember that I've done the 3" with a stock Glock but some days that circle needs to be quite a bit bigger-and some days I get closer
I would use a rest to test the sights and ammo, then you know if it's you or the gun. I like my Glocks but in the .45, I like the HK.
I just caught the 10 yards--I haven't had a G21 in 12 years-but I can say my USP will have them in the X at 10.
Mark
Bookmarks