[script] properly configure dataset in `check-posix-pty` (#9202)

diff --git a/script/check-posix-pty b/script/check-posix-pty
index 0cb7939..554e582 100755
--- a/script/check-posix-pty
+++ b/script/check-posix-pty
@@ -177,7 +177,9 @@
 send "region\r\n"
 expect "US"
 expect "Done"
-send "panid 0xface\r\n"
+send "dataset init new\r\n"
+expect "Done"
+send "dataset commit active\r\n"
 expect "Done"
 send "routerselectionjitter 1\r\n"
 expect "Done"