Yes, the badge will remain even if you delete the course.
Once a badge is awarded it belongs to the user. It can not be deleted from the user, only revoked, as the documentation says.
Once a badge is awarded it belongs to the user. It can not be deleted from the user, only revoked, as the documentation says.
You can verify this for yourself by creating a new course, add one user and one badge and manually award the badge to them. Then delete the course. The badge will remain on the user profile.