Good catch. The behaviour is intended. Without going too much into depth there are multiple approaches out there on how to handle missing values and the unequal operator in the context of missing values.
In this case, the logic is that the value of a missing field is unknown so it could be A but we don’t know. Therefore the A != ? can’t be negated with certainty.
Even though I understand the logic behind this behaviour, I do find it rather unintuitive and unnecessarily complex. The better strategy would be imo to offer the user a tick box to let them decide whether missing values should be handled with certainty or not, the default being as you wish.