That’s by design. Scaling the canvas will scale everything inside of it by default. Just put the canvas inside a div container with display: flex;
and scale that.
I’m not 100% clear what you’re hoping to accomplish if that doesn’t work please give a little more detail.
I have a canvas that I would like to be able to customize the size of. However, when I set the width and height properties in CSS, the entire canvas is scaled. Additionally, I cannot set it back with ctx.scale(1,1) in JS.
I have already seen this and this question which have no acceptable solution.