I also had my battery replaced back in the Spring, and it seems that was when I first began to notice the rough idle. Mine didn't go away, though. I tried the idle recalibration procedure that's found on YouTube and mentioned in other places, but that didn't work for me. What I did find in my research was that the idle drop and vibration only occurs when the transmission is in D and I press down on the brake pedal. If I set the parking brake and take my foot off the brake pedal, the rpms rise to 700+ and the idle smooths out. Press the brake pedal again, and the rpms drop back to about 600 and the vibration returns. This is repeatable. It also occurs with the AC on, but the rpms then are usually a bit higher and the vibrations aren't quite as bad. The consensus seems to be that this is related either to engine vacuum issues with the brake booster, or current drop as the brake lights are on when the brake pedal is pressed. Not sure about that, but the vacuum part seems to make sense to me. I ran through some tests on the brake booster, and it passed all of them. Someone else mentioned that there was an ecu update to address this, so my next step is going to be to contact my dealership and run it by them. Thanks.
BTW, any chance you could try setting your parking brake with the transmission in D, HVAC off, and note the rpms with the brake pedal pressed and not pressed? Just curious if other Foresters with the 2.5 out there have the same behavior. Thanks