I did some further research and I could find some interesting information and I also found out the reason why we didn’t have this issue in the past.
In our latest developments we switched from powerbi-client 2.14.0 to 2.18.0 and the issue appeared. So I thought that this was the reason of the issue. However, we also switched from a single-page PBIX to a multi-page PBIX at the same time. With the tests I did, it turns out that this is the issue. If I remove all-but-one page from my PBIX the issue disappears!
So to summarize:
Powerbi-client 2.14.0 + single-page PBIX --> OK, no issue, the state is correctly applied on load (This was the old version of our software)
Powerbi-client 2.18.0 + single-page PBIX --> OK, no issue, the state is correctly applied on load
Powerbi-client 2.14.0 + multi-page PBIX --> NOT OK, issue present, the state is NOT correctly applied on load
Powerbi-client 2.18.0 + multi-page PBIX --> NOT OK, issue present, the state is NOT correctly applied on load (This is the current version of our software)
So good news that we could narrow down the issue, however it is not solved yet 😃. Can you take this up with the appropriate teams?