Why does Veronica attack me?
Referring to the Wikia page for Veronica none of the actions you've taken should make her hostile. Since you are idolized by the brotherhood I'm assuming you haven't destroyed their bunker - the only action that would make her outright hostile. Anything else would just make her quit as a companion.
In the bugs section of her Wikia page there is nothing listed that would cause her to attack you. It is possible you have encountered a bug that isn't present on the Wikia page. If possible, reload a save from before she attacked you and either resume playing from there or replay your actions to troubleshoot what caused her to attack.
Lastly, can you verify if you have any mods installed? Mods may cause the game to behave in unintended ways and a bugged mod could be the reason she's hostile to your character.
You are playing on Xbox, it is unlikely you have mods installed