How to make mesh axis in local mode like in custom mode?
How have you rotated the cube?

Local transform orientations do follow the object's transforms.

But If you've rotated the cube in edit mode instead of object mode, then you have rotated only the mesh inside the object. Not the object itself, which rotations haven't changed.