In food preservation, citric acid and ascorbic acid are two types of acid used for two different functions. While both are acids, they are not the same. Scientifically, their chemical structures are slightly different, which leads to different functionality.
Citric acid is more acidic than ascorbic acid. Therefore, citric acid is recommended when canning tomatoes to lower the pH or increase acidity. It is a small amount that works effectively. It would take a lot more ascorbic acid to equal the power of citric acid to acidify tomatoes properly. Then flavor would be compromised.
Ascorbic acid is not as acidic as citric acid. Ascorbic acid is better at protecting color changes in certain foods like apples, peaches, and pears.
Source: https://extension.psu.edu/lets-preserve-ingredients-used-in-home-food-preservation