AG had the option not to turn the settlement over to the King if he was worried. At the time he conquered it I don't think he had any reason to worry.

I would suggest that there is logically a period of time between the conquest and the handover, perhaps the rest of that turn, to move your army again and exit the city (I did exactly this at Valencia, Zaragosa, and Marseille, departing each time immediately after conquest). Unfortunately AG has been in Caeranarvon for quite awhile.