If you want to work with modifiers, and it's only about one cube, then you could solve it completely with Geometry Nodes.
Just add a Geometry Nodes modifier, and use this node group:

This will simply create a cube. This has the size specified in the Modifier Properties.
Additionally there is the value Amount, which like the Bevel Modifier changes the size of the bevel.
Basically, I create a cube here, extrude the faces outward, and scale them to create a beveled edge with a $45°$ angle.
Finally, the cube is simply scaled back to the original size, and you have the desired result. 100% procedural.

(Blender 3.2+)