In the Unreal FBX Import Options panel, enable Import Animations and set Animation Length to Exported Time.