You also need to run another API call after you get the ID.
/run print(GetBaseSpellByID())
This is documented in Two most asked questions: Base Spells and Macro locks
But how it works, if a spell doesn’t have a base spell it will return nothing. If it does it will return a different ID. If this is the case GSE stores what this second call returns otherwise it stores the original ID from GetSpellInfo.