I think the problem lies on the surface, but you don’t see it.
experience has shown that many developers turn off block, full page, and layout caches when developing.
most likely you have them enabled for production. try temporarily disabling full page cache and you will see your result.
if this helps add cacheable="false" to your layout