At the very end why set indexS1 to start? The substring between start and end is guaranteed to not contain the str2 chars in order otherwise it would be a smaller subsequence than the one w just found - a contradiction. So we can safely jump indexS1 to end.
Course: https://www.educative.io/courses/grokking-coding-interview-patterns-cpp
Lesson: Solution: Minimum Window Subsequence - Grokking Coding Interview Patterns in C++