At my institution (the University of California), I believe that one can still go through the process of being judged for tenure and what happens is that if one does not have permanent residency at the time of promotion they are instead put on as an "Acting Associate Professor" for a two-year period. They would then become a tenured "Associate ...
It takes less than 2 years in average to get a green card. If the University does not help, you should hire a lawyer. It takes several thousands dollars to do that, but this is money well spent. But most Universities have immigration lawyers and they help.
Bear in mind that I am an international student and I need to start
the visa process to move to the US by fall. What can I do? Is it ok to
withdraw from a Ph.D. after accepting the offer and before starting
That is the tricky part. Depending on circumstances, your visa may be linked to the PhD, it may even be a visa that prevent you from ...
In the US, you can withdraw at any time, even after starting. If you have signed a contract for some services, then you may have to deal with that, but most universities will let it go since those services can almost always be handled by other people.
People leave doctoral education for lots of reasons.
But I suggest you think long term about your career ...