The aspect ratio issue is something you should be able to search on the internet, for example this
might be helpful.
I'm not too experienced with the canvas element yet, but for all I know, clearRect should clear stroked rectangles too. I could imagine that the stroke is put outside the actual rectangle, so if you try to clear a rectangle of the same size, the stroke is not within the area that will be cleared. Did you try clearing a much bigger area than your actual rectangle to see if it still stays visible?
A general comment: Please note that direct manipulations can become slow quickly. There's a number of methods to improve performance, for example multiple canvas elements, off-screen rendering, …