AFAICT MaxEncodedLen doesn't read the attributes #[codec(skip)] and #[codec(encode_as..)] and #[codec(compact)].
Thus it can result in an inaccurate len.
For instance the type:
#[derive(MaxEncodedLen, Encode)]
struct Foo(#[codec(compact)] u8);
will have max encoded len of 1 but can actually encode in 2 bytes.