How to do unmasked addition on SSS masked shares?
It seems that the question you're asking is about how to add a public (unmasked?) value to a secret-shared value. I suggest you edit the question a bit to clarify that this is not related to AES directly.
With that aside, adding a public value to a secret-shared value depends heavily on what secret-sharing scheme you're using, and also the algebraic structure where you're doing it, of course.
To secret-share a  single bit $b$ using additive secret sharing, you sample random bits $b_1$ and $b_2$ constrained to $b=b_1\oplus b_2$. The pair of shares is then $(b_1,b_2)$. To add a publicly known bit $u$, you only need to add it to one of the shares, say to $b_2$, so the new shares are $(b_1, b_2\oplus u)$. You can check that if you add (i.e. XOR) these together then you get $b\oplus u$, so you effectively added $u$ to the secret.
If you're additively secret-sharing elements of $\mathsf{GF}(2^8)$ instead of single bits the principle is the same, except that XOR is replaced with addition in $\mathsf{GF}(2^8)$. Quite coincidentally though, addition in $\mathsf{GF}(2^8)$ is precisely component-wise XOR, but this didn't need to be the case, specially if you used instead, say, $\mathsf{GF}(3^8)$.
Now, all of this was for additive secret-sharing, but this is not how Shamir secret-sharing works. In this scheme, secret-sharing a value $s$ among $n$ parties with threshold $t$ consists of sampling a random polynomial $f(\mathtt{X})$ of degree at most $t$, constrained to $f(0)=s$, and letting the $i$-th share be $s_i=f(i)$.¹ With this secret-sharing scheme, adding a public value $u$ is done by letting each party (not only one) add this value to its share, getting $(f(1)+u,\ldots,f(n)+u)$ as the vector of shares. I encourage you to check why this is a valid Shamir sharing of $s+u$.
To sum up from the discussion above, I think you are mixing additive with Shamir secret-sharing. The method you described and implemented is for adding a public value to an additive sharing, yet you mention in the title and the text Shamir secret-sharing.

¹ Here, the &quot;numbers&quot; $0,1,\ldots,n$ that we are evaluating into the polynomial are simply symbols to represent different elements of the field you're considering, e.g. $\mathsf{GF}(2^8)$.