P-automorphism-invariant not implies characteristic

Statement
Let $$p$$ be a prime number. Then, we can construct a finite $$p$$-group $$G$$ with a subgroup $$H$$ such that $$H$$ is invariant under all the $$p$$-automorphisms of $$G$$, but $$H$$ is not characteristic in $$G$$.

Facts used

 * 1) Bryant-Kovacs theorem
 * 2) Burnside's theorem on coprime automorphisms and Frattini subgroup

An example
This example works for odd primes $$p$$.

Let $$K$$ be a non-Abelian group of order $$p^3$$, and let $$K_1$$ and $$K_2$$ be isomorphic copies of $$K$$. Define $$G = K_1 \times K_2$$, and define $$H_1 = K_1Z(G), H_2 = K_2Z(G)$$. Then, $$H_1$$ and $$H_2$$ are the only two subgroups in their automorphism class, and both are invariant under all $$p$$-automorphisms.

A more general example
This example works for all primes $$p$$, but relies on a sophisticated result called Bryant-Kovacs theorem (fact (1)).

Let $$r$$ be a number distinct from $$1$$ and relatively prime to $$p$$, and let $$V$$ be the vector space of dimension $$r$$ over $$p$$. Consider $$G$$ to be the cyclic group of order $$r$$ acting on $$V$$ by cyclic permutation on coordinates. The Bryant-Kovacs theorem asserts that there exists a $$p$$-group $$P$$ such that $$P/\Phi(P) \cong V$$ and the image of the natural homomorphism:

$$\alpha: \operatorname{Aut}(P) \to \operatorname{Aut}(P/\Phi(P)) = GL(V)$$

is precisely $$G$$.

By fact (2), the kernel of the homomorphism $$\alpha$$ is a $$p$$-group.Notice that since $$G$$ has order relatively prime to $$p$$, the kernel of $$\alpha$$ must be the $$p$$-Sylow subgroup, and thus the $$p$$-Sylow subgroup is normal.

Now, let $$H$$ be a subgroup of $$P$$ containing $$\Phi(P)$$ such that $$H/\Phi(P)$$ is not $$G$$-invariant. For instance, $$H/\Phi(P)$$ could be the vector space spanned by the first coordinate. Then, since the $$p$$-Sylow subgroup acts trivially on $$P/\Phi(P)$$, every $$p$$-automorphism fixes $$H$$. On the other hand, since there are elements of $$G$$ that do not preserve $$H/\Phi(P)$$, there are elements of $$\operatorname{Aut}(P)$$ that do not preserve $$H$$.