The cause is most likely that your font setting (of a program or OS) have gone wrong. As far as I can see the said character in the input box looks rendered with a Chinese font.
The glyph you see and the intended Japanese one share the same meaning and the same code point in Unicode (Han unification). Thus computers cannot tell which is which binary-wise, and it is a font's responsibility to render it correctly according to the locale. Wiktionary usually provides useful information regarding regional variants.

Of course, it does not mean that those shapes are interchangeable, and you will be deemed miswritten if you write it in the first form in Japan. You will have to change the font somehow, but how to actually fix it can be only explained on a case-by-case basis (and I'm not sure it's in the scope of this site).
PS
The effect of Han unification is not always logically consistent, as it had to deal with backward compatibility with existing standards in each country. For example, the right side component alone 呉 is separately encoded for all China, Taiwan/Korea, and Japan standard variations, so you wouldn't be caught in the same situation simply by font corruption.

lang="ja"
attribute to an enclosing HTML tag in the card template (for example,<span lang="ja">{{kanji}}</span>
). In my deck, I just added that attribute to the top-most enclosing tag (a div that contains the entire card contents), so it applies to all text on the card.