URP vs Built-in - Shaders with GrabPass - 2D Renderer?

For the 2D Renderer, check out _CameraSortingLayerTexture . Not identical to a GrabPass but might fit your needs.