It is believed to be the length of the 404 html code which decided whether Google auto-changes the error page ("I believe if Google Chrome sees a very short, stock 404 page (less than 512 bytes), it talks to Google in order to try to suggest other possible pages and options" – Source).

You only need to add those comments to your error layouts. Now the browsers can’t transform them into their own style anymore.
As a result the 404 is displayed as it is supposed to 🙂

A few last words

Some go even that far and call it "hijacking". But nonetheless it might be helpful for some unskilled web users to have this hijacking google keyword search in 404s 🙂
But with the above approach a web developer can decide for himself.