I am sorry for questioning the "law of conservation of energy" first of all.
The expression for the output voltage of the LM317:
contains no any relation to the input voltage. It doesn't care what's the input voltage. It only cares about the two resistors R1 and R2 (in my simulation). Increasing the value of R2 increased the output. But once I get the output equal to the input, further increasing the value of R2 doesn't increase the output voltage. What is the factor that doesn't let the output voltage go beyond the input voltage. I know it won't go (law of conservation of energy) but why?
I have attached the snippets of the output voltage for two different values for the R2 resistors.(I don't know whether those large valued resistors are available. Please bear with me for this simulation)
Edit: So its all the matter of 'Minimum Dropout voltage' (Vin-Vout). But going through this datasheet shows the difference of -0.3 which indicates higher output voltage.