does learning the same spell from different sources allow it to benefit from bonuses from all sources?

For example, an Arcana cleric takes Firebolt with Arcane Initiate, then multiclasses with Artillerist artificer, and also takes Firebolt as one of the Artificer cantrips. Assuming this character has 5 levels as an Artillerist and 8 levels in Arcana Domain,

would casting Firebolt through an Arcane Firearm count as both an artificer spell for the Arcane Firearm feature, and a cleric cantrip for the Potent Spellcasting feature?