Connecting multiple ATmega328p's on same power rail

You need individual VCC and AVCC 100nf bypass capacitors for each processor - as close as physically possible to the chips. 2 x 328’s = 4 caps, minimum.

Add a 10 to 100uf (minimum) electrolytic cap for VCC where it enters the board as well.