I'm making a hot dog sauce that contains tomatoes, bacon & soy sauce. I've tried to preserve it with vinegar, but lost the taste of the product. What can I use to preserve the sauce in a glass container and how long could I store it in a refrigerator?
When preserving food, safety is of top importance, so I would not recommend experimenting haphazardly with sealed jars and preservatives. Generally, cooked leftovers can be kept in the fridge for 3 to 4 days with no special treatment. If you need to keep your sauce for longer than that, we need to do something else.
Pressure canning cooked meat is feasible; however, it uses specialized equipment. It also requires some exactitude to do safely. Unless you are interested in diving into the rabbit hole of canning, I do not think this technique would be convenient.
Using acid to preserve your sauce is a bad idea. Although vinegar or another acid can prevent microbial growth (for example, in a jar of pickles) any significant quantity will make your sauce too sour as you already observed.
Freezing is probably your best bet, both from a food safety and a convenience perspective. Put the sauce in a plastic container, or even better a plastic bag. It can be safely frozen for weeks or months. When ready to use, there are multiple ways to safely defrost the sauce. But the easiest is just to reheat from frozen, either on the stove or in the microwave.