.NET Core 3.1 - Build job can't find file in Unit Test

I am trying to get Travis to automatically build and unit test my repository once a new version is deployed.

I managed to get the build to work, but for some reason one of my unit tests is failing, even though it is passing locally. The unit test in question is responsible for generating a bunch of images and verifying that they were indeed generated.

All paths in the project are generated via path combination between Environment.CurrentDirectory and a relative path. From the debug information added I found that the file does indeed exist, but that the Bitmap constructor is failing, saying that the file cannot be found.

Here is the log of the build:
https://api.travis-ci.com/v3/job/302674138/log.txt

Is this something that can be prevented, or is this a limitation of using VMs to unit-test something?
For now I will disable that specific test, but I will appreciate any response!

Imprint