the moment you leave the country without any job offer cbp will consider you have given up your opt status already that’s the law. If you have an offer then you can leave and reenter but it is not recommended to travel outside the country during opt.