Oh, this is a unicode thing I remember encountering!
You’re seeing the Chinese version of that character.
As I recall, there’s a few characters where multiple versions are similar enough that unicode stores them in the same place and the default they chose looks strange in Japanese. (so it’s only very few characters, not all where there are differences between languages)
See this thread:
The solution is setting Japanese in your preferred browser settings, like this is mine now in Chrome:
That tells your browser which version of the character to prefer when there’s no other information.
(of course if you want to study both Chinese and Japanese and have it always be consistent, you’re out of luck unless websites and users rigorously add tags to those characters to eliminate the technological ambiguity. But again, it’s only a handful of characters, and 直 is the most noticeable, because this only happens if the versions are all very similar indeed)
