Yes ... Pope Leo XIII clearly taught that even IF the essential form happens to be correct, if the intention of the Rite runs counter to the intention of the Church, it would render the essential form invalid. But SSPX have played this game of wanting to have their cake and eat it too, where they can conditionally ordain but still hold that the Rite is (basically) valid.
I do believe if a priest, in some circuмstance, e.g. cσncєnтrαтισn cαмρ, performed a consecration without an integral Mass, he might commit sin, per Canon Law, but it would be valid, if his intention was clearly to do the consecration.
Conversely, a priest can perform the entire Rite, but if it's in am movie or a demonstration ... it's still invalid.
BUT if a priest took that consecration, which may be valid standalone and tried to use it within the context of a non-Catholic Rite (Protestant service), the context of the non-Catholic intention of the Rite would invalidate it (per Leo XIII).
So I do believe if you had a Catholic priest just using the essential form "standalone", it would be valid, but the context (non-Catholic Rite, movie, goofing around, or standing in front of a bakery) ... the context would invalidate it if from the context it's clear that he's not trying to do what the Church does. Priest in the cσncєnтrαтισn cαмρ could be intending to do what the Church does, but just part of it ... though I think it's debatable even there, since you could argue that the Church never intends for consecration to take place outside of a Mass.