Wrapping Text When Updating Content Using Code

Godot V.4.2.2

I want to make my text label wrapping the displayed text automatically inside the panel, I’ve tried using Autowrap Mode but it doesn’t take effect.

I’m writing the text using this code

display_text.text = "this is text"

but the text still dispayed like this

but for some longer text, it’s wrapped normally like this

can someone help me resolve this problem plz
thanks in advance