As far as I can tell, for every pair of units in the game, the sweet spot is always at the extremes. I can't think of any exception where this rule doesn't apply. Heavy sappers, maybe?
Obviously, for the unit that has to go up close to win, actually moving all the way to point-blank range ends up hurting you, because you lose DPS due to moving, and you are potentially losing cover.
This is why for close-range units like Panzergrenadiers, that can actually DPS until far enough, often the best strategy is to sit at mid-range. That's because you still win, and there's potentially more cover for you to choose from.
For myself, the mission for my Pgrens is to push, flank, and/or clear ATGs or MGs as fast as possible. I think pgren bundled nades have more value than their STGs in most engagements I fight using panzergrens. Their sweet spot is: "clearing team weapons" for me, more than a specific range.
If I am playing ostheer and I'm just using my infantry to fight allied infantry I'm looking for a losing battle. Pgrens sweep suppressed infantry or team weapons. Fighting infantry squads in a slugfest with them is asking to be pushed off the field slowly but surely.
Grenadiers, LMG or no, are likewise asking for the same if they're not being supported by team weapons, (and in fact are typically supporting team weapons rather than the other way around.) Otherwise they serve most predominately as snare squads for diving tanks on repairing vehicles or pak positions.