In 2023.3 and later versions you can detect major, minor and patch versions.
Cancelling this 2023.2 tech release issue since the support for this release has come to end of life. Cancelling this 2023.2 port case does not affect any LTS or Unity 6 Beta/Preview that remain open.
How to reproduce:
1. Create and open a new URP project
2. Open Packages/Universal RP/Shader Library/DeclareDepthTexture.hlsl
Expected results: "_CameraDepthTexture_TexelSize" is not declared in "DeclareDepthTexture.hlsl"
Actual results: "_CameraDepthTexture_TexelSize" is declared