You need to consider the scale of the canvas when getting the width or height. I always use this piece of code:
let stageW = (stage.canvas.width/stage.scaleX);
let stageH = (stage.canvas.width/stage.scaleY);
Then if I need to reference the width or height of the canvas I just use the variables stageW or stageH.