Thank you for your advice. I hypothesized that this simple approach should not be a difficult problem, so I compiled the code you advised me on in an initialized project, and I was able to confirm that the problem was resolved! Thank you so much.
Even in a newly created environment, the problem could not be resolved when compiling with hot reload, but I was able to confirm that the problem was resolved when compiling with live coding. I think the problem I was facing was originally a code problem, but I think the problem I’m facing now is a different problem.
I will try to isolate the compilation problem and work on it! I will treat this problem as resolved. Thank you for your support.