Yes, this is expected behavior. Loop starts and if some activity within loop fails it iterates for next loop and run all inner activities again.
You will have to customize the solution with some flag logic to break the loop.
Refer below blog for the logic -
https://andyleonard.blog/2020/06/one-way-to-break-out-of-an-azure-data-factory-foreach-activity/
You can also upvote existing feedback here -
https://feedback.azure.com/forums/270578-data-factory/suggestions/39673909-foreach-activity-allow-break
Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav