For the most part illegal positions are handled just fine, however I was playing a variant with a friend using the board editor where we each start with 39 "points" to spend and take turns "buying" pieces and placing them on the board until we run out of points and then play the position from there.
This is where the anomaly occurred,
en.lichess.org/tbCdrkHr/white#0
in the setup phase, the last piece black tried to place was a knight on c8, which was fine in the board editor, but upon starting the game from position the knight on c8 disappeared. we then tried placing other pieces on c8 to trouble-shoot and any piece placed there would vanish upon loading the game from position. The knight was eventually placed on e8 instead which worked just fine. So obviously this is a unique case and abnormal usage of the board editor, but it does seem to be a bug.
This is where the anomaly occurred,
en.lichess.org/tbCdrkHr/white#0
in the setup phase, the last piece black tried to place was a knight on c8, which was fine in the board editor, but upon starting the game from position the knight on c8 disappeared. we then tried placing other pieces on c8 to trouble-shoot and any piece placed there would vanish upon loading the game from position. The knight was eventually placed on e8 instead which worked just fine. So obviously this is a unique case and abnormal usage of the board editor, but it does seem to be a bug.