Since 58e1c17a58df417dd40f5e4c64fc55eade437efc , the overview docker displays thumbnails for transparent layers incorrectly (e.g. when hiding the background layer or selectively displaying one single layer). The thumbnail is stretch with a wrong aspect ratio.
A solid afternoon of debugging points that the final step of thumbnailing does not provide a size, hence the bounds of the KisPaintDevice are used instead, resulting in a size mismatch.
The attached patch fixes this issue while preserving the fixes from the aforementioned patch.
Note: in 4.1.3, the size also mismatched, but was centered without stretching/resizing in the overview docker with correct aspect ratio; however the canvas viewport outline was wrong.