I have restored this post as it may help other users
OldexR ui.run(background1):wait()
This is a blocking function that will wait until the Window is closed, so you won't see the title changed.
Here is a rewrite to achieve what you want to do :
local ui = require "ui"
local background1 = ui.Window("DexMod 0.1a - Verification", "dialog", 1000, 550)
local text1 = ui.Label(background1, "Verification:", 1, 5)
text1.fontsize = 20
background1.bgcolor= 0x191B19
text1.bgcolor = 0x191B19
text1.fgcolor = 0xFFFFFF
-- Get the Task object that will update the background1 Window until it is closed
local uitask = ui.run(background1)
-- sleep for 5 secs (5000ms)
sleep(5000)
background1.title = "DexMode 0.1a - Setup"
-- Wait until the Task is finished (ie the Window is closed by the user)
uitask:wait()