Suppose $A$ is a set of random variables, all of which are defined on the same probability space $\Omega$. We call $A$ almost closed iff every almost surely converging sequence of elements of $A$ converges almost surely to an element of $A$.
It is not hard to see, that both the set of all random variables on $\Omega$ and the empty set are almost closed. Also the intersection of any number of almost closed sets is also almost closed.
I am looking for an explicit example of two almost closed sets, such that their union is not almost closed.
Non-constructive proof that such pair exists:
Suppose the union of any two almost closed sets is almost closed.
Then the initial supposition would have implied, that the collection of all complements to almost closed sets forms a topology on the set of all random variables in $\Omega$. And the convergence in that topology would be exactly the almost sure convergence.
However, that contradicts the following three well known statements:
A sequence of elements of a topological space converges to a point $a$ iff any its subsequence has a subsubsequence that converges to $a$
A sequence of random variables converges in probability to a random variable $A$ iff any its subsequence has a subsubsequence that converges almost surely to $A$
There exists such probability space $\Omega$ and a sequence of random variables on $\Omega$, that converges in probability, but not almost surely.
@KaviRamaMurthy is correct. The mistake in my proof was that I thought, that convergence in the constructed topology is almost sure convergence, while in reality it is convergence in probability:
Suppose a sequence converges in probability. If all its elements are contained in an almost closed set, then then its limit is also contained there, as any sequence converging in probability contains a subsequence, that converges almost surely.