Same thing with transactional IBX datasets - which also descend from TDataset - as said @LacaK (thus, consistency among transactional component solutions): the TSQLTransaction.Action (caRollback, caCommit, and possibly caRollbackRetaining or caCommitRetaining) is called when all the datasets managed inside the transaction are closed (so, either explicitly, or when their container - TForm or even TDatamodule - is destroyed).
In fact, the transaction that becomes useless when no dataset is open within itself (the transaction detects this context through its dataset pointers list, and concludes that), "closes" \ "deactivates" itself (=~ TSQLTransaction.InTransaction:= False;) after having applied its Action (caRollback, ...) on the server-side. Could be seen as a kind of smart "garbage collector" of the transactional layer.