The RLC handles the segmentation and reassembly of SDUs (Service Data Units) in the LTE and 5G NR networks. When it comes to the scenario where the gNB is not able to decode the last segment of an RLC SDU, the retransmission mechanism will depend on which RLC mode is in use (AM - Acknowledged Mode or UM - Unacknowledged Mode).
For AM links, the PDCP (Packet Data Convergence Protocol) layer triggers the retransmission of RLC SDU if no positive acknowledgment is received for a sent PDCP packet. Therefore, in this case, only the failed segment would be resent, not the entire SDU.
For UM links, the RLC maintains neither status reports nor retransmissions, meaning a lost SDU segment will lead to a lost SDU, and the retransmission will not be initiated by the RLC layer.
The difference in behavior between the simulated UE and the commercial UE that you mentioned might be due to their differing implementations of the RLC protocol stack, or they might be operating in different RLC modes (AM vs. UM), or indeed it could be a vendor-specific adaptation. To get a definitive answer, you would have to reference the specifications of the particular UE device and its implemented layer-2 protocols.