I think I found a way, it's easier than I thought:
var size = msg.CalculateSize(); // msg is protobuf::Message var span = _cache.AsSpan(4, size); // _cache is pre-allocated byte array msg.WriteTo(span);