Does modifying text in smart objects affect the original style

I am currently using psd Java version.
My psd file contains a smart object that contains multiple text layers. When I modify my text, the style of my text layer is not applied to my exported jpg image.

if (layer instanceof TextLayer textLayer) {
                String layerName = textLayer.getDisplayName();
                if (textMapping.containsKey(layerName)) {
                    JSONObject textParam = textparams.getJSONObject(layerName);
                    IText textData = textLayer.getTextData();
                    ITextPortion textPortion = textData.getItems()[0];
                    textPortion.setText(textMapping.get(layerName));
                    textData.updateLayerData();
                }
            }

@poneli could you please provide input PSD file and the full code that was used to get layers from Smart Object and to replace content of Smart Object.