OK, I think everything is back to normal now. Here is what I have done. I followed the instructions in this post:
https://www.reddit.com/r/HomeKit/comments/1nkhrok/psa_if_your_presence_based_automations_stopped/?share_id=_C6QVCKwajDU7Wsssgysm&utm_content=1&utm_medium=ios_app&utm_name=ioscss&utm_source=share&utm_term=1
In addition to the instructions to the top of the post, that is toggling off Home in Settings -> Privacy and Security -> Location Services -> System Services ->, I have also toggled off Shortcuts, restarted the iPhone and toggled both back on.
This caused the automations correctly triggering when I came back home, but it did not solve the issue of the triggers firing randomly during the day when I was home. Also certain automations set to be executed only when I am home were not being executed at certain times of the day. Basically, after I a certain amount of time I was home the iPhone decided I have left home, though I did not move.
To solve this issue I did the opposite of what is explained in one of the comments of the above post. I edited the location triggered shortcuts using my current location instead of using my home address. This caused the location of the iPhone in these shortcuts to change slightly, let's say something like 50 meters or so far apart.
Since then no more shortcuts firing randomly when I am home and on the other hand they are firing regularly when I leave/return. Same for those location based automations defined in Home.
Hopefully this is the end of the story, but it took me one week to solve this and this is something that shouldn't happen because before updating to iOS 26.1 everything was running perfectly.