The Victory Rifle is inside a locked (Very Hard) Locker in the Abandoned Shack west of Rockbreaker's Last Gas. This will require a Lockpick skill of 100; there is also no key or trigger that will open the locker. You can take Dogmeat into the shack and ask him to find you the weapon and he will get it out of the locker for you. It might take a few goes because he might get you the wrong weapon.
If you have Star Paladin Cross or Jericho as a follower, he/she may find and use the weapon for himself/herself. You will still be able to get it from him/her by trading weapons.
If you bring any NPC that needs a weapon into the cabin, he/she/it will run to the locker and apparently without problem take out the Victory Rifle. This is one way to get around the need for 100 Lockpick to open the locker.
There appears to be a bug where if you fire while using the scope, the first shot will be normal, but the rest will do no damage. This can be fixed simply by going away from the scope and then coming back.