Engine runs rough like missing on excelleration but when you apply the breaks the engine runs smooth for a moment. I am getting a code of egr low vaccume but have replaced the egr valve already.
The code tells all. The EGR valve does not create vacuum, the engine
does, so the low vacuum code at the EGR valve is not pointing to a bad
EGR valve, but rather a low vacuum signal to the valve. Typically the
only way to have low vacuum, is to have a leak somewhere. The
improvement in engine performance when you apply the brakes tells me
that you brake booster is most likely the culprit when it comes to the
vacuum leak. Not typically a DIY project, your best bet would be to
take the vehicle to the dealer and have them confirm the diagnosis and
replace the brake booster.