Well that entirely depends on location and the discretion of the manufacturer. BMW have been tightening their belts due to the recent economic car manufacturer downturn resulting in things like the following: Cars blacklisted and / or electrical warranties voided due to simple coding changes, ISTA auto flagging DME flashes invalidating entire engine / drivetrain warranties etc. etc.
One has to remember in various countries / regions / states warranties are in addition to statutory rights not the de facto standard. Even here the burden of proof is on the manufacturer but due to a web of sensors it's not difficult to find out if they want to. It's your word against there's and many aren't qualified to give a professional opinion, unless you're a trained car engineering expert or diagnostician a third party independent adjudicator may have to get involved further increasing cost if it all goes down hill.
Also remember some places have very strict emissions regulations so modifications to engines or exhausts won't just invalidate warranties but remove your car from road legal status.
Car manufacturers will happily deny claims (usually dependant on cost) and let it go to court, it's happened and owners have lost leaving them in further financial debt. On top of that every finance contract I've seen strictly states no modifications, under a lease or finance deal you do not own the car (even if it's registered in your name). Whilst it's rare for a finance company to go after someone it doesn't mean they haven't, a recent YT'er with an M3 was served with a pay in full notice.
From various threads over the years BMW seemed to let
mods slide in the past, Kia might have that mindset at the moment but any modifications comes with associated risk. Personally I don't think it's worth it unless you're out of finance and couldn't care less about warranty.