On this answer
\deriv appears as red text when I am viewing the answer normally.
Is this just me ? Is this a known bug ?
It is not really a bug but a strange quirk with
\deriv is not defined in the answer post you mention, and thus it does not work; it would need to be defined before it is used. But it is defined in the other answer post.
Without additional measures it is not confined to this answer post, but is applied to everything that comes "after" it. Apparently the preview in some technical sense comes after it, but in the view you use the answer post comes before.
If you switch to sorting the questions by "oldest" so that the other answer is displayed first on the page, then it works there, too.
The easiest fix is to include the newcommand from the other answer also in this one. (I do not do it right away so that you can check what I said.)
To avoid such interactions it is possible to confine newcommand and alike to the post. The way to do this is explained in this answer
If this would be done for the other answer, the error should also be visible in preview.