It’s one of the most common things bunnies do, and I wouldn’t worry that she will hurt herself. I haven’t heard of that happening yet.
Yes, it is one way they get your attention, so the first thing to do is ignore her when she does it, ie. do not reward the behavior with attention, pets, treats or letting her out. She may do it less if she gets the message that you are NOT getting her message.
But they also do it because chewing is their way of grinding down their teeth. It’s much better to chew wood toys and particularly chew lots of hay each day, but some chew bars also and I suspect it just makes them feel good. It is also done when they are bored and have pent up energy. Not harmful, just annoying.
It’s the main reason I don’t sleep in the same room with my bunny.
There’s not much you can do other than give her something else to chew on, like a big willow ball that she can gnaw on and tear apart. It’s healthy and fun, and easier to control than a wood toy. She may lose the habit, or continue, but as she gets older it should taper off a lot.
As for making it taste lousy, the best thing to use is diluted white vinegar. It’s a great cleaning solution (no soap, just 50/50 vinegar and water) for cleaning the bars of the cage, and they don’t like the smell. Wipe down the bars and see if she avoids them a bit. But not too much vinegar because they have to live with the odor and normally you would rinse it with clear water after cleaning to remove most of it.