FindPython3 behaves differently with every little change in CMakeLists.txt

I am trying to use the next piece of cmake code:

#set(Python3_FIND_STRATEGY LOCATION)
#set(Python3_FIND_REGISTRY FIRST)
#set(Python3_FIND_VIRTUALENV FIRST)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)

The three commented lines it just does not matter how to activate them, sometimes it works and when adding a MESSAGE(STATUS …) then it stops finding Python3. Why does it stop findig Python3 with every little change in the CMakeLists.txt?

Does cmake --find-debug help at all?

Cc: @marc.chevrier