You've already been given a number of solutions, where the part that actually goes within the components is only one plate high, while the actual connection is a bit more. I can't do any better, but I want to suggest another option:
The two different socketright combination of these parts allow some offset (if the parts fit), and these also allow movement in more than one direction.