If I may, if shown this problem:
- I might buy another safe (sell the old one) to fit more/different guns)
- Depending on clearance, you could have the beretta's barrel shortened slightly, (Check out the wilson combat guns), if the clearance issue is very small
- A compact beretta can likely take a fullsize mag with a spacer on the bottom to fill the difference in grip. This might be the golden ticket. A compact running +2 mag extensions is another option.
In addition to that you would also be able to have that beretta in a stock/standard "as designed" form
- If the safe is special/srs-business, another platform, like the sig P320 (IIRC one can get a full frame compact slide combo) might be worth looking into
Trying to make a custom one off gun is literally the most involved, possibly highest cost solution.
If you want a custom beretta, buy all means get one if you can and post pictures, because 'merica
But it would likely be cheaper to get a different style safe by that point.
My 2 cents
ETA: Not mine