She noticed that the money was gone.

Literal

She [topic-は] that money [subject-が] is-gone [the fact that-ことに] realized.

こと and の both nominalize clauses, turning a sentence into a noun-like chunk, but they aren't perfectly interchangeable. こと leans abstract — facts, ideas, propositions — while の leans concrete and immediate. Both ~ことに気付く and ~のに気がつく ('notice that...') are correct; the こと version often feels slightly more deliberate or formal. 気付く and 気がつく mean the same thing; the kanji-only spelling 気付く is just a written compression of the phrasal idiom.