They say the last name written was "L.Lawliet" a.k.a "L".
But that's not true. It's a "bug" in the movie.
The last name written was "Yagami Light" not "L.Lawliet".
Ryuk killed Light after L wrote his own name on the death note.
So, the movie was wrong