Thanks for the query.
Better to continue the penicillin therapy.
This time you can go for long acting penicillin.
After taking the treatment for 1 to 2 months, go for repeat test for syphilis
with your doctor's advice.
If test comes negative, no need to bother.
But if comes positive again, you may need further treatment and frequent antenatal visits to check the well-being of the baby.