During execution of the generateto{address|descriptor} RPCs the NotifyBlockTip and NotifyTransactionChanged signals are emitted, which in turn interact with the GUI via ClientModel, WalletModel, and TransactionTableModel classes.
On regtest it is possible to run the mentioned RPCs with a large enough num_block argument. That causes the GUI to freeze, as noted by jonasschnelli.
Please note that the GUI hangs regardless of whether the RPC is called via bitcoin-cli or in the GUI console.