Arduino Mega, PWM signal is not 0-5 V

We are trying to control a motor with a 0-5 V voltage. We are switching between a throttle and a PID-controller on the arduino.

What im trying to do is read a value between 0-5 V then use analogWrite() to create a corresponding PWM signal between 0-5 V.

The problem is that at 0V at the readThrottlePin (15), the output on ThrottlePin (46) is 0V and that OK, but when it goes to 0.1V at readThrottlePin the output is a PWM signal with around 1% duty cycle with a RMS around 3.2V.

Shouldn't it be a square wave between 0 - 5V and not a square wave between ~3.2 - 4.7V?

PIN: ThrottlePin = 46, ReadThrottlePin = 15 (OUTPUT, INPUT)

After some troubleshooting I found that I get a much better square wave at pins 3 and 4, from ~0.6 - 4.8 V, but I cant seem to replicate this on pin 46