Forbidden doesn't necessarily mean illegal.
Well, it might. But I'm willing to bet 99% of the council, maybe even most of the order, knew about their eloping. It might be a different matter on the Naboo side of things, the galaxy at large might be into the perported jedi guardian of the Republic screwing the hot young senator from naboo but I doubt naboo politics would be happy about it. Jedi might have even let him stay given how important he is. Just needed more therapy from yoda, or even a direct conversation with ahsoka about his marriage.