I'm going to use some products shared under free of use licenses (mostly BSD). For example i want to use "on-permise" version of Sentry (https://docs.getsentry.com/on-premise/license/#sentry-license). Sentry offers also paid cloud service. My question is: can any company change their project license in the future? I'm afraid that i will build my projects in depending of free products and some day developers will say: "We're changing license, now you must pay for commercial license or use our paid cloud service".
If you received a copy of a copyrighted work under a particular license in the past, that work is licensed to you under the terms of that license. If the copyright holder stops offering the work under BSD terms, that does not lessen the fact that you already did receive the work under BSD terms. The copyright holder may choose to stop distributing new copies to other people under the old license, but the old license grant offered to you in the past will persist, unless either
the license expires, or
the licencor explicitly revokes your license grant.
The BSD license (and any OSI-approved license) does not have an expiration date, so we do not need to worry about the first possibility.
A license can be revoked only if either
the terms of the license explicitly allow the licencor to do so, or
the license was granted in such a way that the licencor received no economic consideration for the license grant.
The BSD license is silent on revocability, so we must see whether there is economic consideration involved. According to Jacobsen v. Katzer, a public open-source license grant may have economic consideration, even absent any exchange of money:
Traditionally, copyright owners sold their copyrighted material in exchange for money. The lack of money changing hands in open source licensing should not be presumed to mean that there is no economic consideration, however. There are substantial benefits, including economic benefits, to the creation and distribution of copyrighted works under public licenses that range far beyond traditional license royalties. For example, program creators may generate market share for their programs by providing certain components free of charge. Similarly, a programmer or company may increase its national or international reputation by incubating open source projects. Improvement to a product can come rapidly and free of charge from an expert not even known to the copyright holder.
(See also Are licenses irrevocable by default? on OpenSource.SE.)
Thus, there is a strong possibility that there is consideration involved in your case, and the licencor may not be able to revoke the license already granted to you.