What actually differs between the two files
Less than you'd think, and just enough that one won't work where the other does. A WebVTT file must begin with the word WEBVTT on the first line; without it the browser discards the whole file silently. Milliseconds follow a dot instead of a comma. And the sequence numbers that an SRT requires are surplus here.
There's a fourth difference that catches out most quick converters: WebVTT reads the text as if it were HTML. A stray ampersand or a less-than sign mid-line is treated as markup and swallows whatever follows. Here they're escaped before anything gets written.