Rates for maps and flows in a deterministic multidimensional weak invariance principle