Just in case, I'll mention that if the enemy captures one of your castles, it will be destroyed.
That's strange, in one of the game versions, he captured a castle and started recruiting units from it.
Added 2 minutes later
P.S. However, it should be noted that he didn't capture it in a battle, but entered an empty one - I took the army out of it and left.