Try this:
This way the speed variable will get updated on the server and replicated to all other players but there will be no conflict with the local player who is setting the variable. Set max speed does not need to replicate only the variable that is setting the speed
Sorry just realized you will have to check “is locally controlled” before setting the replicated variable so other players don’t overwrite it and send it to the server but “set max speed” needs to be separate as that does need to execute on all players, so something like this