Press tofu to remove excess moisture, then cut into 1-inch cubes. Toss tofu cubes with 2 teaspoons cornstarch until evenly coated.
Heat sesame oil in a large wok or skillet over medium-high heat. Add tofu cubes and fry until golden brown and crispy on all sides, about 6-8 minutes. Remove tofu and set aside.
In the same pan, stir-fry garlic and ginger for 30 seconds until fragrant. Add onion and carrots, cooking for 2-3 minutes.
Add bell peppers and green beans to the pan. Stir-fry for 3-4 minutes until vegetables are tender-crisp.
In a small bowl, whisk together soy sauce, water, brown sugar, rice vinegar, and remaining 2 teaspoons cornstarch to make the teriyaki sauce.
Pour sauce over vegetables and return crispy tofu to the pan. Stir gently until sauce thickens and coats everything evenly, about 1-2 minutes.
Sprinkle with chili flakes if desired and serve immediately over rice or noodles.