The problem is that given a &mut Nested the current expectation is to be able to write std::mem::size_of::<Nested>() bytes to it, which include the padding bytes. However with your approach flag is placed in n's padding byte, which mean you would end up writing garbage/invalid values to it, which is UB!
And you could argue that you could make Nested's size equal to 7 as to not include the padding byte where flag is placed, but another expectation is that elements of slices are placed at an offset multiple of the element size. But if Nested's size is 7 then the second element of a [Nested] would end up at offset 7, which is not aligned, and thus UB again.