waveform appearing on output of

When measuring the output of the amp, both terminals( + and - ) register as + 2.5v with reference to the power ground. This suggest that like the mp3 module i have been using, it is a bridged amplifier(i think).
However whereas when looking at the mp3 modules output there is a clean +2.5v output, when i look at the PAM8403's output there is a waveform.

Yes, that's class D, its a purely digital waveform using PWM.

I have included the picture from my oscilloscope. It appears to feature a full cycle at about 230KHZ.
Now I would have thought that a frequency at this speed would be undetectable to my ear but there is a distinct high pitched noise which i can hear which increases as the voltage which i provide to the amp increases(non surprisingly).

The audible tone needs a spectrum analyzer to characterize, I suspect you have break-through from
the Arduino's digital switching on the input. Or perhaps inadequate decoupling on the PAM8304's rails,
or ground currents due to failing to implement a star-ground for the audio signal.

At first i thought it may have been something to do with the input signal but this recording was taken when the amp wasn't connected to anything.

On page 6 of the datasheet: https://www.diodes.com/assets/Datasheets/PAM8304.pdf
it shows how to reduce EMI (and reduce high frequencies going to the speaker too of course).

You can add a proper LC filter to the output too - the reason this isn't described in the datasheet
is that this chip is designed for miniature equipment where the extra bulk isn't desirable.