With a BMI of 38.5 you are definitely at a higher risk of miscarriage than if your BMI was under 30.  The lining of your womb (endometrium) is affected by an abnormal hormone balance which may lead to miscarriage.  Weight loss is the best investment for a successful pregnancy.