It seems in Chess 960, you are not able to castle according to the rules.
Please look at Nakamura - Carlsen position:
nbbrqkrn/pppppppp/8/8/8/8/PPPPPPPP/NBBRQKRN w - - 0 1
Both side are able to castle short at the first move, according to Magnus Carlsen:
Indeed in Lichess it seem you are not able to castle if you have the rook in the destination square of the king.
Please look at these posts upon Chess960 Castling rules:
Please, can you fix it?
Have a nice day,