God provided definitive instruction to His people about how those who would draw near to Him in public worship had to be dressed:
Exodus 28:42 And thou shalt make them linen breeches to cover their nakedness; from the loins even unto the thighs they shall reach: 43 And they shall be upon Aaron, and upon his sons, when they come in unto the tabernacle of the congregation, or when they come near unto the altar to minister in the holy place; that they bear not iniquity, and die: it shall be a statute for ever unto him and his seed after him.
God specified that Aaron and his sons had to have on linen breeches (underwear) that were of a specific length to cover the nakedness of specific parts of their bodies (“from the loins even unto the thighs”) when they drew near to Him to worship Him. In an all-male context and even in a context when there would have been no other humans present at all, Aaron and his sons had to do this.
Moreover, they had to have other garments on over these linen breeches. If God required these men in an all-male context to dress modestly to cover their nakedness in this way, how much more so does God want all people to dress modestly in public worship in a mixed group by covering these parts of their bodies at least as much as these priests had to when they worshiped God in the tabernacle and in the holy place!
God certainly wants people to dress modestly in public worship.