In the attached image you can see my project, where Y axis goes vertically. But running script to get the size of the bounding box mixes X and Y axes.
The second image is from unity which detects bounds size correctly.
ps
Script i run is just printing X,Y,Z of size vector of the bounding box:
print("Size - X: ",chunk.size.x, "Y: ",chunk.size.y, "Z: ",chunk.size.z)