https://github.com/elastic/elasticsearch/pull/97304 removes several places that might do an expensive rebuild of the cluster state via `getStateForMasterService`. There's one other call we should be able to remove, in `JoinValidationService`, but it's a little tricky since we rely on seeing the last-accepted state for the cluster UUID validation, and it's not obviously ok to expose the last-accepted state without the no-master block.

This is a fairly minor issue because we do not do this join validation during elections, only if we're the elected master, and in that case `getStateForMasterService` is cheap. But that's not guaranteed, and we should strengthen this to avoid the that expensive step whenever possible.
server/src/main/java/org/elasticsearch/cluster/coordination/JoinValidationService.java
+ "] and is now trying to join a different cluster with UUID ["
                            + remoteState.metadata().clusterUUID()
                            + "]. This is forbidden and usually indicates an incorrect "
                            + "discovery or cluster bootstrapping configuration. Note that the cluster UUID persists across restarts and "
                            + "can only be changed by deleting the contents of the node's data "
                            + (dataPaths.size() == 1 ? "path " : "paths ")
                            + dataPaths
                            + " which will also remove any data held by this node."
                    );
                }
                joinValidators.forEach(joinValidator -> joinValidator.accept(transportService.getLocalNode(), remoteState));
                channel.sendResponse(TransportResponse.Empty.INSTANCE);
            }
        );
    }
    public void validateJoin(DiscoveryNode discoveryNode, ActionListener<TransportResponse.Empty> listener) {
        if (discoveryNode.getVersion().onOrAfter(Version.V_8_3_0)) {
            if (executeRefs.tryIncRef()) {
                try {
                    execute(new JoinValidation(discoveryNode, listener));
                } finally {
                    executeRefs.decRef();
                }
            } else {
                listener.onFailure(new NodeClosedException(transportService.getLocalNode()));
            }
        } else {
            transportService.sendRequest(
                discoveryNode,
                JOIN_VALIDATE_ACTION_NAME,