IMO a failed workout is when you think to yourself after that you could have completed it.
Sometimes a hard workout is a stretch workout, and you go into it knowing you probably can’t complete it. That’s ok and normal. Sometimes getting 3 out of 5 intervals feels like a success because that’s all you can do.
Or similarly, if you are trying to figure out a good repeatable VO2max power (from like Huffaker) and you mess up an interval because it was too hard, definitely not a failure, just trial and error.
But if you bail out of a workout early because your head isn’t in the game, or if you are turning the intensity down so much that you aren’t getting the stimulus, then it’s a fail.