It’s not going to be replaced automatically even if you send it to Apple. Someone has to take it apart and replace parts manually.
The official way to replace the battery is to replace the whole lower case, including keyboard and maybe trackpad, however that is expensive and will cause you to lose a few functions that are paired to the logic board. If you want to replace just the battery, you have to scrape the packs off the case, which can be a fire hazard if you don’t do it carefully enough.