Can you post a link to a game where you experienced this?
Game allows castling when the squares are under attack. Including castling into a check.
I’ve never seen any example game where it that was allowed.
If you need help, please contact our Help and Support team.