The written form of يَكْتُبْنَ remains the same after لَمْ, but its meaning changes to past negation.

Mudari Akhaff and Lam