Stir frying for too long or at too high a temperature makes the sugar carbonized (caramelized).
When you add sugar to your cooking, if you stir-fry it for too long or if the temperature is too high, the sugar will carbonize and caramelize, and you will get a bitter taste. If there is already a bitter taste to avoid the bitter taste aggravation immediately add some water, add some ginger and vinegar during cooking to help cover the bitter taste. If you know that the cooking time plus longer, sugar and other flavorings can also be added later, but also a small amount of one by one.