ATMega328P - How to protect application flash memory from reading by ISP
Every AVR microcontroller has Lock-bits to protect the memory. From the datasheet:

And if you're using 'ProgIsp' programmer, simply click the button like the following image:

Then, set two lock bits to 0 and press the write button:

By doing this, you can not read the flash and EEPROM but you will be able to re-flash the chip. However, every time you re-flash the chip, lock bits will be set to 1 again and you need to lock it after flashing.