Do you absolutely want to always avoid the knees going over the toes?
Is it as bad as “they” say? (They being trainers, that are empty echo chambers of other trainers…without understanding WHY trainers say this in the first place.)
With weighted squats, you generally do want to squat more back than down, not allowing the knees to come forward over the toes. In doing so, less of the stress goes straight to the knees.
But to think this universally applies is the leap of logic that just isn’t logical.
The principle is if the body can normally go into a position, it is likely not bad. The ankles and the knees both go into flexion and can do so safely.
For instance, if you want to perform a pistol squat, you’ll see that the knee must come over the toe. This is required for counterbalancing purposes. And pistols can be done safely.
For more information on the bodyweight squats and pistol applications, as well as other position some trainers will tell you to avoid, check out The Ultimate Guide to Bodyweight Squats and Pistols.