I used to use a Lumicycle battery bag and over time it did scratch the paintwork a bit from the grit that got caught in between, but I wasn’t overly fussed.
With my current frame, there wasn’t enough of a straight section to mount it on the frame so it’s now mounted in a bottle and goes in the cage.
The smaller battery for my spokeshirts light goes under the stem if needed and I zip tie it in place as the velcro doesn’t feel too secure.
If you are worried about it mucking your frame up or jostling loose, run an old split-open inner tube around the part of your frame secured at the ends with zip ties to protect the frame and give the battery somewhere more sticky to grip onto…