There’s a few options that have all worked for me. First off you could use clear zip ties and thread them through the natural holes in the rocks and trim the excess off.
Secondly you could use reef putty or super glue to secure them. This wouldn’t be ideal since the tank is setup, and the pistol shrimp has burrowing behavior. But adding egg crate under the sand and setting the rock on it would give it a better platform and if the rocks did fall it would not damage the bottom of your tank but I think the first two options would be better.
What tank is that though? I’m interested in a nano and I like the tall look of that one.