Nothing is wrong with your XSLT code. And nothing is wrong with your input XML or the CSS files. The only reason I can think of for the behaviour you describe is that b.css
ceases to be available.
This is the output I get with Firefox, the blue font color stays even if I refresh.
EDIT: It might help to have internal CSS styles instead of referencing them from external files.
The stylesheet below does essentially the same as yours, except that the CSS is internal. This might lower the chances of CSS files not being available.
Stylesheet
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html" indent="yes" doctype-system="about:legacy:compat"/>
<xsl:template match="/">
<html>
<head>
<title>Title</title>
<style type="text/css">
h1 {color:red;}
h2 {color:blue;}
</style>
</head>
<body>
<h1>will get red color from a.css</h1>
<h2>will get blue color from b.css</h2>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Output