The proportional amounts of monomers within a copolymer will greatly affect the properties of the material. However, as known as composition drift, the monomer ratio in a copolymer can deviate from the value expected from the raw material ratio due to differences in monomer reactivity. Hence, it is therefore necessary to optimize the polymerization process on the basis that this inevitable composition drift will take place. In the present study, styrene-methyl methacrylate copolymers were generated using a flow synthesis system and the processing variables were tuned employing Bayesian optimization (BO) to obtain a target composition. Initial trials employed BO to produce four candidate points per cycle, completing the optimization within five cycles, and the solvent-to-monomer ratio was identified as the most important variable. Subsequent BO tests employed 40 points per cycle and established that multiple sets of processing conditions could provide the desired composition, but with variations in the physical properties of the copolymers. The role of each variable in the radical polymerization reaction was elucidated by assessing the extensive array of processing conditions while evaluating several broad trends. The proposed model confirms that specific monomer proportions can be produced in a copolymer using machine learning while investigating the reaction mechanism. In the future, the use of multi-objective BO to fine-tune the processing conditions is expected to allow optimization of the copolymer composition together with adjustment of physical properties.