I run the same script between edit debug mode and publish mode, there are different results. At the edit mode will have the correct result, that's why?
I have attached the script file.
@yuelei fu - can you ad some tags for the product in use. I will be able to get someone from the product team to answer but I do not know which product you are referencing.