You can clear the contents of a layer without deleting the layer from your document. If you often use this command in your workflow, you can assign a keyboard shortcut to it. For information about assigning keyboard shortcuts to commands, see Customizing keys.
Pressing Command + A (macOS) or Ctrl + A (Windows), and then pressing Delete doesn't clear all layer contents, just what is visible on the canvas. Any content outside the canvas will remain on the layer.
You can also clear the contents of a layer by selecting the layer in the Layers panel, and clicking Layers Clear Content.
You can also clear the contents of a layer by right-clicking the layer in the Layers panel, and choosing Clear Content.