Code gets stuck on the last note of the melody after being played

Thank you so much, and yes just like Danois said, there is no errors when compiling the code. I'll try adding an extra one to see if it works once I get access to my project again. Hopefully it should go well, I'll keep you guys updated.