The forms that cause the confusion
Lie (recline): lie, lay, lain, lying. Lay (put): lay, laid, laid, laying. The past tense of “lie” is “lay”, which is why the two collide. (Lie meaning “tell an untruth” is regular: lie, lied, lied, lying.)
Catch it automatically
The grammar checker flags common mix-ups like this one by looking at the words around them, and the sentence checker can explain any sentence you’re unsure about.