\[Sigma] = 5.; \[Lambda]0 = 2.; k0 = N[(2 \[Pi])/\[Lambda]0]; \[Delta] = \[Lambda]0/10; \[CapitalDelta] = 40*\[Lambda]0;
\[Phi]in = Table[0, {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
dim = Dimensions[\[Phi]in][[1]]
d = \[Lambda]0/2; (*typical scale of the absorbing layer*)
Imn = Table[10 (E^-((x + \[CapitalDelta]/2)/d) + E^((x - \[CapitalDelta]/2)/d) + E^-((y + \[CapitalDelta]/2)/d) + E^((y - \[CapitalDelta]/2)/d)), {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
L = -1/\[Delta]^2*KirchhoffMatrix[GridGraph[{dim, dim}]]; (*Discretized Laplacian*)
ReMapC[x_] := RGBColor[(2 x - 1) UnitStep[x - 0.5], 0, (1 - 2 x) UnitStep[0.5 - x]];
\[Alpha][t_] := 2*t^3;
frames = Table[
Ren = Table[ If[y < 0, 1, 1 + I*\[Alpha][t] ], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
n = Ren + I Imn;
M = L + DiagonalMatrix[SparseArray[Flatten[n]^2 k0^2]]; (*Operator on the left-hand side of the equation we want to solve*)
sourcef[x_, y_] := E^(-((x + (\[CapitalDelta]/4) )^2/(2 \[Sigma]^2))) E^(I 1.5 x) E^(-((y + \[CapitalDelta]/2)^2/(2 (\[Lambda]0/2)^2))) E^(I k0 y);
\[Phi]in = Table[Chop[sourcef[x, y] ], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
b = -(Flatten[n]^2 - 1) k0^2 Flatten[\[Phi]in]; (*Right-hand side of the equation we want to solve*)
\[Phi]s = Partition[LinearSolve[M, b], dim]; (*Solve the linear system*)
ArrayPlot[
Transpose[((Re[\[Phi]s])[[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]]/0.012)^1], ColorFunction -> ReMapC , DataReversed -> True, Frame -> False, PlotRange -> {-1, 1}, ClippingStyle -> {Blue, Red}, Epilog -> {White, Line[{{0, 180}, {400, 180}}], Text[Style["n=1", Bold, 20], {30, 160}], Text[Style[ StringForm["n=1+i``", NumberForm[\[Alpha][t], {3, 2}]], Bold, 20], {60, 200}]}]
, {t, 0.000, 1, 0.03}];
ListAnimate[Join[frames, Table[frames[[-1]], 5], Reverse[frames]]]