Like kjodle indicated, by default you cannot even assign any category term to a page, there is no established relationship. The code I posted establishes the relationship, it is required to do anything with categories and pages together.
It’s not possible for any one object to be a descendant of a different object type, descendants must be of the same type. Just like you cannot have a horse be a child of a dog. Only dogs can be children of dogs ?? You can assign any term to any page after my code. The term or page may be a descendant of any other like type, so some kind of relationship is possible, but not like you are thinking.
You may have issues with the permastruct that you desire. You can add a rewrite rule so that they work, but WP could confuse other two parameter permalinks to be a category/page permastruct, resulting in no posts found errors even if the requested post exists. This is because the first term may not always be a category, for example a parent/child page permastruct and not category/page.
Taxonomy terms usually have a “base” parameter so the WP parser knows the next term is a category and not a page, tag, post, or whatever else non-category. It’s much better to have example.com/cat/category-term/page-slug/ than just example.com/category-term/page-slug/. The “cat” parameter leaves no ambiguity to what comes next. But if every possible permalink on your site will always include a category term as the first parameter, your desired permastruct will work. Use add_rewrite_rule() to set it up.