Fortunately I have found the solution for my issue (following https://learn.microsoft.com/en-us/answers/questions/1184008/sharepoint-check-in-check-out-issue).
To replace a file in SPO using Graph API we must follow 2 steps, such as:
- call a PUT API with which the file get's uploaded.
- Here the original file with same name enter into a check out phase
- call a POST API with checkin property and a JSON as body including "comment" attribute and a value to preserve file history