It is a generalization of the below solution on my Youtube channel. In the video, I assume $D$ has to lie on line $AO$, but the proof actually still works even if that is not the case (but you still want to draw in the center $O$ of the circle, and let $AO$ meet $BC$ at $E$).
https://www.youtube.com/watch?v=897In0LmTJ0
Here is another solution using projective geometry:
Let the parallel to $BM$ through $D$ meet $\omega$ at $Q$ (so $DQ \perp CD$). Then, if we project through $D$ onto $\omega$,
$1=\frac{BY}{MY}=(B,M;Y,BM_{\infty})=(B,C;P,Q)$.
Thus, $BPCQ$ is a harmonic quadrilateral, so the two tangents to $\omega$ at $B$ and $C$ and the line $PQ$ concur, at point $A$.
Then $\angle APC = 180 - \angle QDC = 90$, so $AP \perp CP$.