The docs for `blocksonly` say that "Transactions from the wallet or RPC are not affected" but the code says:

    if (gArgs.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && gArgs.SoftSetBoolArg("-walletbroadcast", false)) {
        LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
    }

Here's the relevant documentation:

    -blocksonly
       Whether to reject transactions from network peers. Transactions from the
       wallet or RPC are not affected. (default: 0)

    -walletbroadcast
       Make the wallet broadcast transactions (default: 1)

Doesn't that imply that `blocksonly` *does* affect transactions from the wallet?

g_wallet_init_interface.Construct(node);
    /* Register RPC commands regardless of -server setting so they will be
     * available in the GUI RPC console even if external calls are disabled.
     */
    RegisterAllCoreRPCCommands(tableRPC);
    for (const auto& client : node.chain_clients) {
        client->registerRpcs();
    }
    g_rpc_node = &node;
#if ENABLE_ZMQ
    RegisterZMQRPCCommands(tableRPC);
#endif
    /* Start the RPC server already.  It will be started in "warmup" mode
     * and not really process calls already (but it will signify connections
     * that the server is there and will be ready later).  Warmup mode will
     * be disabled when initialisation is finished.
     */
    if (gArgs.GetBoolArg("-server", false))
    {
        uiInterface.InitMessage_connect(SetRPCWarmupStatus);
        if (!AppInitServers())
            return InitError(_("Unable to start HTTP server. See debug log for details.").translated);
    }
    
    for (const auto& client : node.chain_clients) {
        if (!client->verify()) {
            return false;
        }