Hello,
By default, the working hours are set from 08:00 to 12:00 and from 13:00 to 17:00. When you use the following command, you change these settings:
gantt.setWorkTime({ hours: ["8:00-17:00"] })
As you enabled the skip_off_time config, the non-working hours are not displayed (because there is the hour scale).
But if you disable that config, you will be able to see the difference:
If you expect something different, please provide a more detailed description. And you can also share a picture that shows how you imagine it should look and work.