IFixit says that Apple may have activated software battery protection on newer devices that disables battery replacement, or only allows it if it is self-installed and factory-supplied.
After the replacement, a message will pop up which will take you to set the battery and tell you to replace it because the battery is bad. It says this even when a brand new battery is inserted, and even if a well-functioning Apple-made battery is inserted, according to iFixit, not at an official partner. Each battery is assigned a unique identifier, and if the software detects that it has been replaced, it indicates security reasons and the device cannot be used properly until the official partner has unlocked it, including software. It is known that the manufacturer does not want to change this method, who believes that this solution is intended to ensure that the devices continue to operate safely and well. Others, however, say it is a simple pull-off, as replacing a battery has already been more expensive than official partners, and after that it can be even more expensive.