There are two 'crop-to-content' (1) Image -> Crop-to-content (2) Layer -> Crop-to-content.
Are you using the correct version. Layer -> Crop to content sizes the layer around the content and leaves the canvas size the same. The only indication will be the yellow dotted layer boundary.
Image -> Crop to content will shrink the canvas.
Post the image you are trying to crop for better advice.
edit: this a very short demonstration of the difference between layer and image crop https://i.imgur.com/jNlGfei.mp4
Are you using the correct version. Layer -> Crop to content sizes the layer around the content and leaves the canvas size the same. The only indication will be the yellow dotted layer boundary.
Image -> Crop to content will shrink the canvas.
Post the image you are trying to crop for better advice.
edit: this a very short demonstration of the difference between layer and image crop https://i.imgur.com/jNlGfei.mp4