It can as long as the screw’s tensile or compressive strength is sufficient to handle the load.  For example, the shear strength of a typical C93200 bronze nut with a length equal to twice its major diameter will exceed the tensile strength of a mating AISI 1045 steel screw.   In this case, increasing the length of the nut will have no effect on load capacity.
On-the-other-hand, the load capacity of plastic nut and steel screw combinations can be increased in proportion to nut length since the shear strength of a plastic nut is significantly less than the tensile strength of the steel screw.
Increasing nut length will reduce efficiency as well as limit available travel.  In addition, pitch diameter allowance is generally increased when nut lengths exceed twice the major diameter.
If capacity is a concern, alternative materials and/or larger diameters should be considered where permitted.  Safety nuts are also available to provide back-up capacity in addition to indicating wear.
Contact Rempco before designing a special nut which is longer than twice the major diameter.