Drawing Canvas's automatic resolution mode tries to match the resolution it is displayed at. However as everything can be sized and scaled at fractional values, it's possible the Drawing Canvas ends up at a fractional size like 256.5 x 256.5. It is not possible to allocate half a pixel - the surface size must be an integer. So in this case it rounds the surface size up to 257x257, and then displays only a 256.5 x 256.5 size area from that surface. That allows the same fractional display sizing that other objects support, but means that sometimes the surface size is unexpectedly one pixel larger. It's not a bug, just a consequence of this design.
You can snapshot an area of the canvas, so you can snapshot the size you really want (e.g. 256x256), or you can use fixed resolution mode which bypasses all that fractional sizing logic.