Both will be 'gone' (in terms of mega level digimon), but your base digimon will become an egg again
If it was max friendship it will become awakened (0 -> +1), which means it has higher max level/higher possible stats.
So do not research, when your mega is not max friendship.
How sure are you about Heracle? Could digivolve my Betamon into Veggiemon, which evolves to Megakabuterimon...
Btw when I awakened my Metalete it was max friendship, but not max level (was 62/75). It got from +2 to +3, so all you need is max firendship and not max level
How many fuel to evolve to an ultimate +3 btw?
Could alternatively go for Saberleomon.