The bonus-action spellcasting rule states (PHB p. 202):
A spell cast with a bonus action is especially swift. You must use a bonus action on your turn to cast the spell, provided that you haven't already taken a bonus action this turn. You can't cast another spell during the same turn, except for a cantrip with a casting time of 1 action.
The description of a spell scroll states (DMG p. 200):
If the spell is on your class's spell list but of a higher level than you can normally cast, you must make an ability check using your spellcasting ability to determine whether you cast it successfully. The DC equals 10 + spell's level. On a failed check, the spell disappears from the scroll with no other effect.
If you fail the check to cast the higher-level spell via the scroll, does the spell count as being cast despite there being no effect?
This question is very similar to this one - If a spell cast from a Spell Scroll is Counterspelled, is the scroll consumed? - but I am not sure if the answers in that question apply to this situation as well.