“Rules as written” is a subjective method of interpretation.
I want to to just say “no”, but it isn’t quite as simple as that. “Lore” and “rules as written” aren’t the same category of thing.
“Rules as written” is an interpretive method. It attempts to minimize the amount of inference brought to a ruling by providing the most plain reading of the text the reader can come up with. Even this is highly subjective. I disagree with others all the time on this site about what exactly the “rules as written” reading of a rule should be. I would ask “according to who?”, because there is no universal standard for “rules as written”. It’s a tool in the toolbox of players for understanding how to play the game, and different players are going to apply this differently, different DMs are going to use this tool differently when running their games.
It simply doesn’t make sense to point at a text and say “this is rules as written”, that would be a category error. “Rules as written” is a method of reading the text, not a property of the text itself.
Rules text and lore text are different sorts of things.
Lore is an entirely different type of information from rules. Rules text is player facing, lore text is both player facing and character facing. Rules text is put together using language the players understand, and the rules text doesn’t make sense to the characters. But lore text is understandable by the characters in the fiction of the game universe. We should not expect a DM to just change the rules of the game, but the DM can be expected to change lore to suit the world they want to build.
So these are entirely different types of text with different purposes, generally speaking. However, as you have pointed out, the Monster Manual can make this distinction blurry by framing stat blocks with text about the monster, as well as providing insight into what a monster is capable of, and even what rules might apply to it. The line between rules and lore isn’t always clear. But this is okay because:
World building is the DM’s responsibility.
The introduction to the Dungeon Master’s Guide calls the DM the “Master of Worlds”. Putting together the lore of the world is the DM’s job. So when it comes to the lore texts in the various published materials, it’s up to the DM to use them or not, and how they are to be used. If the DM wants to apply a “rules as written” method of interpretation to a particular section of lore, they can do that. The Monster Manual is explicit about this:
If you’re an experienced Dungeon Master (DM), a few of the monster write-ups might surprise you, for we’ve gone into the Monster Manuals of yore and discovered some long-lost factoids. We’ve also added a few new twists. Naturally, you can do with these monsters what you will. Nothing we say here is intended to curtail your creativity. If the minotaurs in your world are shipbuilders and pirates, who are we to argue with you? It’s your world, after all.
So the DM can approach lore with a “rules as written” frame of mind, or they can chop it up and rebuild it however they like.