I am not able to reproduce either. Given that this was submitted 4 years ago, I cannot recall exactly what I saw before but things seems fine based on my repro steps. Thanks!
> # Odd Behavior
>
> 1. open `sample.el` with: emacs -Q sample.el
> 2. eval the `defadvice`
> 3. eval the `progn` portion of the provided code.
> 4. transient mark something
> 5. hit C-.
>
> now the active-mark disappears.
>
> AND what is even weirder is that if you remove the `compile` option from
> the `defadvice` then there is no issue. but there is something weird here!
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I tried reproducing this problem with Emacs 25.1 (and Emacs 28), but I
was unable to -- the active region didn't disappear.
Are you still seeing this issue in recent Emacs versions?
--
(domestic pets only, the antidote for overdose, milk.)