So the こととなった means 士道's invasion caused the perfect scene to crumble?
Yes, that's right.
according to my textbook, when ことになる is used in the sense of "to cause", it is usually used in a conditional sentence and the なる is in dictionary form.
As you wrote, the explanation in your textbook is for ことになる. ことになる is
usually for conditional or future, whereas ことになった is
usually for past or result.
そんなことを
したら二度と人前に出られないことに
なる。
If you do such a thing, it will cause a situation "you can't appear in public again" (= you won't be able to appear in public again).
そんなことを
したから二度と人前に出られないことに
なった。
Because you did such a thing, it caused a situation "you can't appear in public again" (= you became unable to appear in public again).
Because 士道 came into the classroom and the girl noticed it, the almost perfect scene crumbled. Makes sense?
Incidentally, "usually" is not the same as "always". ことになる
can mean "to cause". For instance, the following sentences have the same meaning and the same nuance as the original.
だが、その完璧にも近いワンシーンは、すぐに崩れることとなる。
少女が士道の侵入に気づき、目を完全に開いてこちらを見てきたのだ。
As for ~となる vs. ~になる, it's said that the former focuses more on the result of the change, and the latter is more on the process of the change. Also, となる sounds more classical/formal, but they are interchangeable in most cases.