This one is tricky to explain but it works as Designed:
- In HDRP the shadow is shown as a Boolean but internally it is represented as an Enum.
- #Light.m_Shadows.m_Type=1 => this matches the Enum HardShadow. But by default enabled shadow are Soft (2)
- If you search using #Light.m_Shadows.m_Type=2 you will match stuff.
- If you enable + disable it somehow sets the Shadow to Hard (which matches the original query)
- If you want to see an example for yoursefl: right click on the Shadow -> enable property in the Inspector and select the menu item: Search Same PRoperty Value. You will see that the query is correctly setup to use Enum values.
If there is a bug it could be in the HDRP code that sets up the shadow value. Why enabled + disable sets it to hard?
But search is working as intended.