I tried on several machines but I was unable to recreate that behaviour.
If I set in the prefs to always use compact view & arrange items by type, it just works.
I tested this on both UM 22.04 LTS and UM 24.04 LTS.
But maybe this can be of some help:
Besides the default view that you've set, Caja also stores the view for every folder where you change this view. This always overrides the default setting.
It is stored in the directory .local/share/gvfs-metadata but not in a human readable form. To show this you need to use the gio command to extract the info you need.
Let's take my homedirectory as example:
gio info . | grep caja
metadata::caja-default-view: OAFIID:Caja_File_Manager_Icon_View
metadata::caja-icon-view-auto-layout: true
metadata::caja-icon-view-sort-by: name
metadata::caja-icon-view-sort-reversed: false
metadata::caja-icon-view-tighter-layout: false
metadata::caja-icon-view-zoom-level: 3
metadata::caja-list-view-sort-column: name
metadata::caja-list-view-sort-reversed: false
metadata::caja-list-view-zoom-level: 1
The easiest way to set everything to your default is to empty the directory .local/share/gvfs-metadata . beware though: you will lose also all your custom foldercolors (if you've set any).
Ofcourse you will lose some assorted metadata which, in my opinion, is not a big deal because the system will recreate it anyway when needed.
tl;dr:
rm $HOME/.local/share/gvfs-metadata/*
You will have to logout and login again (or reboot) for the changes to take effect
Seeing that info - there appears to be no simple means of telling it to behave better, so I guess I'll just have to poke it again & again as I have been doing.