Ah so your wiki is editable by other users too ! Then you need to use the BrowserStorage Plugin: https://tiddlywiki.com/#BrowserStorage%20Plugin
Demo: https://browser-storage-demo.tiddlyhost.com
EDIT: I misunderstood your comment, you meant that the startupaction was triggering a dirty state for the wiki, however luckily the browser storage addon doesnt have that issue
EDIT2: Correction: it will trigger a dirty state but only for you, try opening the demo in private mode and you will see that the save button is not red.
EDIT3: Another solution is to use a startupaction + a test to see if you are logged in or not, but this is less flexible. If you want only one username to be saved this could be fine.
Change the startupaction to this:
<$list filter="[{$:/status/IsLoggedIn}match[yes]]">
<$action-setfield $tiddler="$:/status/UserName" text=“My custom username”/>
</$list>
You can also modify the filter that trigger the dirty state to ignore the username : in $:/config/SaverFilter
, write
[all[]] -[prefix[$:/HistoryList]] -[prefix[$:/StoryList]] -[status[pending]plugin-type[import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state/]] -[prefix[$:/temp/]]
-[[$:/status/UserName]]