Hi zzw
"when you input 2mm gap, because the pipe stiffness is large"
No this is not the reason.
Do not be much serious of zero gap or 2 mm gap for most normal piping stress calculation just follow whatever your company practice says.
For highly critical system, sensitive nozzle or very large diameter make 2 report ,one with zero gap & another with 2 mm gap . Consider conservative result among both of two result in terms of support load, stress & nozzle load.