I'll bet the airbleed screw on the cyl that dies has vibrated closed, or the idle air circuit is blocked. A quick check would be to put a mark (pen mark or other) on the body where the air scew slot lines up, then turn in (counting the number of turns or increment) and see if it's turned all the way in or almost all the way in. If it's about 3/4-1 turn out (turn it back out to where it was) then the idle air circuit may be blocked with carbon/oil (from oil breather into airbox). On my throttle bodies (900ssie) one has no resistance at all to turn in or out, so to make sure that one doesn't "self adjust" I have a glob of silicon seal to hold the airbleed screw head from turning.
Also check the air bleed screws for the evaporative canister hoses where they attach to the throttle body - in case one of them is loose, allowing air to enter throttle body. Check spark plugs, plug boots, all grounds etc.
Also check to make sure the new battery is being charged - otherwise at idle it may be drawing more power than available (to run headlight, ECU/Electronics, and spark the cylinders). Could be a failed regulator/rectifier (happened on another bike of mine).