DnD 5e has optional rules for flanking that includes guides for how it works when using a hex-grid tactical map:
On hexes, count around the enemy from one creature to its ally. Against a Medium or smaller creature, the allies flank if there are 2 hexes between them. Against a Large creature, the allies flank if there are 4 hexes between them. Against a Huge creature, they must have 5 hexes between them. Against a Gargantuan creature, they must have at least 6 hexes between them. - (DMG pg.251)
Perhaps helpfully they supplied an image showing a large creature (taking up 3 hexes) with four red hexes highlighted between two flanking attackers, but only because they're counted the long way round!
For every other size creature you can count the required number of spaces between flanking attackers without including the attacker's spaces, and for Gargantuan creatures there's even two spots that would flank with any given opposite, but if you don't include any attacker's space, there isn't a qualifying space for the second flanking attacker to take:
Interestingly square grids give far more options: large creatures have two possible flanking positions for any given non-corner opposing flank, huge have three and gargantuan four, as the guide there says
When in doubt about whether two creatures flank an enemy on a grid, trace an imaginary line between the centers of the creatures' spaces. If the line passes through opposite sides or corners of the enemy's space, the enemy is flanked. - (DMG pg.251)
On a hex grid ends up far more rigid, it appears. The wording in the DMG (and the fact that four unoccupied spaces are highlighted in the accompanying image) suggests to me that you're not supposed to count the occupied spaces, but if you can just count the long way around than two adjacent spaces would qualify. I have looked and can't find an errata, which I'd have expected by now if this was simply an oversight, so I'm really quite confused!
I can only see four potential solutions, all of which seem to run contrary to some of the material in the DMG:
You count the square of one of the flanking attackers. This would render the image supplied very misleading, and would make hex grids closer to square ones on how many valid flanking positions exist (though it would be very easy to flank a medium creature.)
You can count the long way 'round. Obviously this is problematic as it basically means any two spots are valid flanking positions provided you count the long way. It would render the whole section quoted above completely pointless.
Against Large creatures the allies flank if there are 3 hexes between them, not 4. Obviously this is a direct contradiction, but it makes large creatures function for this rule similarly to gargantuan creatures.
It's just impossible to flank large creatures. Which obviously seems arbitrary enough to be considered not the intent, especially as the image given is of a large creature.
Is there an errata that I couldn't find that gives a different way of ruling this? (Maybe "[x] number of adjacent spaces unoccupied by attackers means a creature is not flanked"?)
Alternatively, if there is no RAW solution to this, is there a generally accepted ruling?