practical examples of this, if you’re curious, include the Tūtohu Whakatupua (which declared the Whanganui River and tributaries as a legal entity), the agreement around Mount Taranaki (which grants it legal personhood), and the invalidated Lake Erie Bill of Rights (passed by Toledo, OH and was designed to allow residents to bring lawsuits on behalf of Lake Erie to protect it)
These do not grant anything human rights, they grant things the status of legal personhood, which has a very specific set of actions that an entity is legally acknowledged as being able to take, such as signing contracts and owning property, as 2 examples. They are sometimes called juridical persons.
You can’t be charged with assault against a company for punching a building, or kidnapping or illegal detainment for stealing an object granted legal personhood.
It doesn’t literally treat (or conflate) these things as being the same as humans.