If you add a Google Form to a Google Classroom assignment and the student fills out the Form it will automatically mark the assignment as done in Google Classroom.
Only if the Google Form is the only attachment.
When making a Google Classroom assignment you have an Add button and a Create button. You can use this ONLY to add the one Google Form. If you use them for anything else the auto submit does not work. I try to avoid the word attachment since they are not attached but rather linked from Google Drive. But if you have 2 or more attachments of any kind Google Classroom will not autosubmit once the student fills out the Google Form.