Problem with Piezo - it just keeps buzzing

111windmills:
Does anyone have any suggestions on why this is happening or how to fix it?

It is happening because you create buffer overflows in your melody array.
And you can possibly fix it by avoiding buffer overflows.

This for-loop is trying to play much more notes than you have defined:

for (int thisNote = 0; thisNote < sizeof(melody);thisNote++)

As "sizeof(int)==2" with 8-bit Atmega controllers, "sizeof(melody)" is twice as many bytes in size as the number of notes your array actually has defined.

When using a 32-bit DUE with "sizeof(int)==4" it's even worse by the number of buffer overflows you create in your sketch.