NANO 328p boot loader

Activate verbose output by executing pio settings set force_verbose Yes and re-upload. You should see the avrdude command and the used config file. Activate verbosity in the Arduino IDE to see what config file it uses. Compare the two.