I struggle mightily with "on"/"in". It's a funny thing; English native speakers will tell you that there are rules: "in" is for "inside" and "on" is for "on the surface", as simple as that. But almost every use I can think of is ambiguous. Is that smile in your face or on your face? Are you sleeping in your bed, because your mattress closes over you like the insides of a bag, or on your bed, because it's just a wooden pallet the place you sleep "on" (in?) ?
On this subject and for particular cases, ChatGPT fights BERT sometimes, Google's grammar checker fights ProWritingAid, and my flesh and bone editors fight each other. But it's all so simple.
It is complicated, and many people speak English differently (generally more casually) than they write it (or should write it if they're concerned with rules). As for prepositions and sleeping, I sleep in bed, on a mattress, between the sheets. ;-)
Difference between written and spoken language is common if not universal. Some languages, Arabic for example, the two are so remote they are in a state of Diglossia.
Prepositions are pretty arbitrary in all the languages I know. Often there is more than one option with slightly different connotations or even denotations. Like for example “on time” vs “in time.”
It's not just you; engines like Inform also struggle to maintain coherence.
Things go in a CONTAINER. Things go on a SURFACE.
Then there's FURNITURE, which does both but not really. People sit on a bench, but they sit at a table. Only Things sit on a table. People sleep in a bed, but all Things sit on a bed.
On this subject and for particular cases, ChatGPT fights BERT sometimes, Google's grammar checker fights ProWritingAid, and my flesh and bone editors fight each other. But it's all so simple.