You are doing explicit time stepping, so solvability is not much of a problem.
You can write for the last grid point $$ du_n/dt = (u_{n-1}-2u_n+u_{n+1})/h^2 $$ with the ghost value $u_{n+1}$ being $$ u_{n+1} = -u_{n-3} + 4 u_{n-2} - 6 u_{n-1} + 4 u_n $$ A Taylor expansion shows $$ u_{n+1} = u_n + h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ So the ghost value is just obtained by a fourth order extrapolation of the solution. No boundary condition is being applied.
This does not correspond to anything physical or mathematical. The solutions in fact seem to be growing unboundedly with time when I ran the Python code. So I would not attach any significance to the solution you are getting out of this.