Why does diode keep conducting even after voltage across it is negative

The inductor's stored magnetic energy will try and keep current flowing through both itself and D2 by generating sufficient back-emf to forward bias D2. That's pretty much what an inductor will do in this situation.

Why does diode keep conducting even after voltage across it is negative

You might think that it's negative but, until the inductor has pretty-much got rid of most of its stored energy, the diode will be kept forward biased (like it or not).


From KVL, $$ R I + L \frac{dI}{dt} + E = V_s \sin(\omega t) \tag{1} $$ for \$a/\omega \le t \le (\pi + a)/\omega\$ and the general solution of eq. 1 is $$ I(t) = I_0 e^{-\frac{R}{L}t} + \frac{V_s}{R^2 + (\omega L)^2} (R \sin (\omega t) - \omega L \cos (\omega t)) - \frac{E}{R}. \tag{2} $$ At steady state, \$I\$ at the beginning and end of cycles are same, i.e. cyclic condition; $$ I\left(\frac{a}{\omega}\right) = I\left(\frac{\pi + a}{\omega}\right) \tag{3}. $$ By solving eq. 3, we can get \$I_0\$ and the particular solution of eq. 1.

If \$I(t) > 0\$ for any \$t\$, the circuit is working in Continuous Conduction Mode (CCM) and all diodes are conducting current all the time. Otherwise, Discontinuous Conduction Mode (DCM) and diodes block the current for a period in a cycle. For DCM, eq. 3 is not applicable and initial condition \$I(a/\omega)=0\$ is used instead.

It is a typical case which can be found in a lot of power electronics books.