In SwXStyle::setAllPropertiesToDefault() at: https://github.com/LibreOffice/core/blob/eef1d712c409878678b4ffbf33e44cac6d564cc2/sw/source/core/unocore/unostyle.cxx#L2529 there are quite some defaults for PageDescs hardcoded in the UNO wrapper layer (including e.g. the 2 cm borders etc.). A cleaner approach would be to have the core objects have a functions that sets up default on initialisation or when reset and have the UNO wrapper just trigger that instead of duplicating hardcoded defaults.
I can give it a try
I submited a pathc to gerrit with a function (https://gerrit.libreoffice.org/c/core/+/113104) for some hardcoded defaults. Feedback about whether the patch is relative with the bug objective is greatly appreciated.
Panos committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6c241f991809dd9ab825baf400c6da77c1c130bd tdf#98749 Move initialization of page defaults to writer core It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
It seems this is done, so closing.