to call the music of the great galant musicians pre-Classical is no more enlightening than to call George Gershwin pre-Rock or Elvis Presley pre-Hip-Hop. - Robert Gjerdingen
Music history these days tends to look at the period roughly from the 1720s to 1770s as typified by the galant style, bridging the gap between the high baroque and Viennese classicism. Galant can encompass both 'late baroque' music such as Domenico Scarlatti and 'proto-classical' music such as the sons of JS Bach. Styles overlap and transition gradually and music history 101 tends to gloss over the middle of the 18th century.
While JS Bach's music of the 1710s and CPE Bach's music of the 1760s differ stylistically, JS Bach's later music absorbed the new style, this can be seen in the differences in the preludes in Books I and II of the Well-Tempered Clavier, where the figuration preludes common in Book I (published 1722) are replaced with binary forms analogous to Scarlatti sonatas in Book II (published 1742).
Both JS and CPE could write in a very similar style in the 1730s/40s