I think that U+0000 does not need to be replaced in serialize an identifier.
To serialize an identifier means to create a string represented by the concatenation of, for each character of the identifier:
- If the character is NULL (U+0000), then the REPLACEMENT CHARACTER (U+FFFD).
- [...]
The examples below the definition of CSS.escape() use it in document.querySelector() but this method parses its input with parse a selector, which leads to replacing U+0000 with U+FFFD in filter code points.