Anonymity is darkness! And darkness invites sin.
(Isaiah 45:7) I form the light and create darkness, I bring prosperity and create disaster; I, the LORD, do all these things.
(Psalm 18:11) He made darkness his covering, his canopy around him-- the dark rain clouds of the sky.
(Isaiah 45:3) I will give you the treasures of darkness And hidden wealth of secret places, So that you may know that it is I, The LORD, the God of Israel, who calls you by your name.
Darkness is not evil. Darkness means mystery and hiddenness, things which aren't known. It can hide evil, and it can hide good things too, and the Trinity use it for their purposes.
It's not good to add our own laws onto what God is doing in our lives. If holy spirit tells someone not to be anonymous, fine, but there's no commandment about it.