It wasn’t possible for Lord Rama to die because Hanuman wouldn’t allow Yama to claim Rama’s soul. To divert the attention of Hanuman, Rama dropped his ring through a crack and asked Hanuman to fetch it for him.
Then the king informed him that Rama deliberately dropped down the ring to divert his mind from Lord Rama’s death.