Firstly you should know that H1B employee, while in the US and actively employed with H1B sponsoring employer cannot work for any other job than the one in the H1B petition. So basically you already violated the H1B laws.
Your situation also complicates the income tax obligations when on H1B in the US. H1B are taxed same as US LPR/Citizens i.e. they are taxed on worldwide income and you generated income in India for the time you were in the US and worked India job.
That being said, I don’t think there is a good way for USCIS to know that you violated H1B rules by working for two months for an offshore job, unless you report your India income in your 2022 US tax return and that USCIS may request one in future for whatever reasons.
My guess is your future extensions/amendments may sail through smoothly but you need to be more informed about the H1B laws and try to not to be out of compliance in future while you are in the US on H1B.