From what we currently know, there’s no need to avoid cornstarch during pregnancy as long as you’re sticking to its traditional use in cooking.
Cornstarch is an easy way to thicken sauces of any kind, savory or sweet, and it's generally not consumed in large quantities. The potential consequences of consuming cornstarch in larger amounts are mainly gastrointestinal (it might mess up your poops).
If you find yourself wanting to eat cornstarch in dry form though, the same with any other chalky substance, this might be a sign of something else going on. Pica is a condition that can develop during pregnancy due to anemia and can cause weird (and potentially dangerous) cravings, so reach out to your doctor if you notice any stranger than normal cravings.