Limit town hall to 1 and build more if you upgraded to keep

Hello, I’ve limited town hall to 1 using the following action:
Player Group - Pick every player in “Players” and do (Player - Limit training of Town Hall to 1 for (Picked player))

I want players to be able to build another town hall when they have fully upgraded their current town hall to a keep. The issue with the above action is that as soon as town hall is starting to upgrade to keep you are instantly able to build another town hall, but I want the town hall to be fully upgraded to keep before you can build another town hall. Any ideas how to solve this?

This is for my 6 player coop map to prevent one player from taking all gold mines early.