This observation is spot-on. By mid-level, a melee warlock will consistently be doing around 30-40 pts. of damage per encounter, on their opponents turn --ie without using any of the warlock PCs actions-- if they use Armor of Agathys. They gain this benefit by virtue of being easier to hit. Once the armor's gone, they can either re-cast it, if they have a slot available, or retreat and blast.Seeing as a lot of Warlock DPR actually comes from getting hit a lot (Hellish rebuke and Armor of Agathys) and they have a fair few class features and spells that grant temp HP or resistance, this latter aspect is an intentional feature of the class IMO.
Or you go the opposite route and build a lower-damage melee warlock meant to tank/draw melee attacks, with a high AC and a spell like Mirror Image running.