That’s not right. You have to accept Jesus Christ as your lord and savior and ask for forgiveness of sin. You can’t just commit the sin and just be like, oh but I believe in Christ. Christ needs to fill your heart and you have to be truly repentant. Only God knows what’s in your heart though.