I just did a factory reset so it doesn't have any app more than the ones that comes with the phone.
In battery optimization are only 3 apps with "battery optimization not available": Carrier provisioning service, carrier services and download manager. I can't change that option.