Prepare the Chicken:
In a large bowl, combine the flour, cornstarch, garlic powder, salt, and pepper.
Dip each chicken piece into the beaten egg, then coat with the flour mixture. Set aside.
Fry the Chicken:
Heat about 1 inch of vegetable oil in a large skillet or wok over medium-high heat.
Once the oil is hot, add the chicken pieces in batches. Fry for 3–4 minutes until golden brown and crispy.
Transfer the cooked chicken to a plate lined with paper towels to drain excess oil.
Prepare the Sweet and Sour Sauce:
In a small bowl, whisk together the pineapple juice, rice vinegar, ketchup, soy sauce, brown sugar, and cornstarch.
In the same skillet (remove excess oil), add the pineapple juice mixture. Stir over medium heat until the sauce begins to simmer and thicken.
Once the sauce thickens, add the pineapple chunks, bell pepper, and onion (if using). Stir to combine and cook for 2–3 minutes until the vegetables are tender.
Combine the Chicken and Sauce:
Add the fried chicken to the skillet and toss to coat with the sweet and sour sauce. Stir well to ensure the chicken is evenly coated and heated through.
Serve:
Serve the Sweet and Sour Chicken over steamed rice or with stir-fried vegetables for a complete meal.