How do you connect to the A0 pin if the shield is applied? The pins are not passed up.
A4 and A5 are internally (on the UNO board) connected to SDA and SCL, so these are not available as analog inputs if you use any I2C device like the motor shield.
Next time please post the pictures to the forum and not an external site. Two reasons: it’s much more complicated to get to the pictures for every reader and after a few months they simply disappear and a later reader cannot see what we saw when we answered.
I cannot find any hint on the pictures why the analog input should not work. Having the wire with the analog signal near the motor isn’t good for the signal quality but it doesn’t remove the complete signal.
Please post your code (and use code tags! That’s the </> button in the editor), maybe we find something there.