The content of the patent application is written in the master's thesis. Will it affect the patent application?

It will affect. It is best to apply for an invention patent before the paper is published. After the paper is published, the patent application cannot be authorized. The paper serves as a comparative document for the patent application, so it is basically impossible to authorize the patent application. After the application is completed (application submitted), you can write or cite it in the paper, and it will not affect the patent authorization.