Investigation of the stability of the inverse spectroscopic problem of diatomic molecules