You can switch companies, but you must manage your background verification (BGV) proactively to prevent future red flags.
The transition is entirely possible because your current employer has already established a precedent of accepting your clarification. Since the cases under Section 506 (criminal intimidation) and Section 509 (insulting the modesty of a woman) of the Indian Penal Code (IPC) are still pending and you have not been convicted, you are legally innocent until proven guilty.
Once you receive the official offer letter and are asked to fill out the BGV or onboarding forms, you must declare the case if there is a question asking: "Are there any pending criminal cases against you.
Do not wait for the new company's BGV team to find the case and flag it. Be ready to upload a single, organized PDF file containing the documents proving your innocence.