Finding a signal inside another signal
As I wrote in the comments, this can be solved using cross-correlation.

Take your mask of length $L$, invert it and start performing the convolution between this inverted mask and the original signal (or, directly, use scipy.signal.correlate() in Python with the two signals, the original one and the mask). If you get a peak in your correlation at sample $m$, this means that if you take your mask and overlay it over the original signal such that the first sample of the mask is at the $m$-th sample of the original signal (using the function with the parameter mode='same'), then you will have a good match (i.e., for that instant of time, the signal is pretty similar to the mask). Then you can conclude that from $m$ to $m+L−1$ the signal has a shape that looks like the one of the mask.

I checked the signal you've uploaded and, as you pointed out, following the procedure above one gets some non-desired peaks due to the fact that the original signal has some high values that don't correspond to a similarity in shape with the mask, but nevertheless return a high value of cross-correlation because the sum of the elementwise product is high. This could be solved "filtering out" these non-desired values.

The most similar signal to the mask will be... the mask. Thus, calculate the correlation between the mask and itself (the autocorrelation at $0$). This will give you a number that would represent the maximum possible similarity to the mask. Then, you can ignore those values in the original cross-correlation that are greater than the autocorrelation at $0$, as they surely correspond to those high peaks the original signal has. This should do the trick.