What AWG should I use between a 200A main panel, a generator switch and a 100A sub panel
The exception for using #4 on 100 amps only exists for the service or feeders that carry the entire load of the premises.

310.15(B)(7) 120/240-Volt, 3-Wire, Single-Phase Dwelling Services and Feeders.
For individual dwelling units of one-family, two-family, and multifamily dwellings, conductors, as listed in Table 310.15(B)(7), shall be permitted as 120/240-volt, 3-wire, single-phase service-entrance conductors, service-lateral conductors, and feeder conductors that serve as the main power feeder to each dwelling unit and are installed in raceway or cable with or without an equipment grounding conductor. For application of this section, the main power feeder shall be the feeder between the main disconnect and the panelboard that supplies, either by branch circuits or by feeders, or both, all loads that are part or associated with the dwelling unit. The feeder conductors to a dwelling unit shall not be required to have an allowable ampacity rating greater than their service-entrance conductors. The grounded conductor shall be permitted to be smaller than the ungrounded conductors, provided the requirements of 215.2, 220.61, and 230.42 are met.

I added the bold print emphasis in the article.
You would have to use #3 for the feed. Notice the last sentence if you want to downsize the neutral. Check those articles first.
Good luck and stay safe!