I don't agree with what that person told you. In my opinion "She realized she had forgotten her keys" is correct. "She realized she forgot her keys" seems like an abbreviated conversational form that, though widely used and tolerated, is seen to be inferior on close inspection.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.