With the current implementation there are couple of problems with the auto eval. mode in Lua. For details see the test project attached to https://phabricator.kde.org/D12074 and the comments therein.
Will be addressed in https://invent.kde.org/education/cantor/-/issues/6.