The for an ally’s territory when that ally’s capital has fallen is…
If the territory is liberated from the enemy, then the ally nation that liberated it gets control of it and any infrastructure (AA, IC) that are present. This includes collecting income. However, upon liberation of the capital that originally owned that territory, ALL such “protectorates” return to the original nation immediately.
Ally nations cannot seize control of “hold out” territories where the vestiages of a previous ally are still “holding out” against the enemy despite the loss of their capital.