Preheat the oven to 350F. Grease a 9 X 13 baking dish and keep it ready.
In a bowl with chicken pieces season it with salt and pepper.
Coat the seasoned chicken pieces with cornstarch first and then dip it into the beaten egg mixture. Repeat the same with the remaining chicken pieces.
Heat a pan with oil, add the coated chicken pieces and cook the chicken until browned for 4-5 minutes.
Meanwhile, take a medium bowl and combine sugar, ketchup, white vinegar, apple cider vinegar, soy sauce, red chili flakes, and salt. Place the chicken in the prepared baking dish and pour the sauce mixture over the chicken and bake for 40 - 50 minutes.
Every 15 minutes stir in the chicken and sauce and bake until the sauce is thickened and well coated in the chicken.
Serve the chicken warm along with rice and green onions on top.