text: Title: TensorBoardLogger has the wrong epoch numbers much more than the fact
  Body: ### Bug description
  
  I used the following code to log the metrics, but I found that the epoch recorded in the tensorboard logger is much more than it should have:
  
      def training_step(self, batch, batch_idx):
          x, y  = batch
          y_hat = self.forward(x)
          loss = torch.sqrt(self.loss_fn(y_hat,y))
          self.log("train_loss", loss, logger=True, prog_bar=True, on_epoch=True)
          return loss 
          
      def validation_step(self, batch, batch_idx):
          x, y  = batch
          y_hat = self.forward(x)
          loss = torch.sqrt(self.loss_fn(y_hat,y))
          self.log("valid_loss", loss, logger=True, prog_bar=True, on_epoch=True)
          return loss
  
     pl.Train(..., logger=TensorBoardLogger(save_dir='store',version=log_path), ....)
  
  In the configure, I set max_epoch=10000, but in the logger, I got epoches more than 650k:
  ![d9dc51214ca78a81ba849ff967f459f](https://github.com/Lightning-AI/pytorch-lightning/assets/80281876/68971f90-9ff3-41eb-a688-564cdabcf1f7)
  ![image](https://github.com/Lightning-AI/pytorch-lightning/assets/80281876/436f5029-5820-4df7-8106-d708193b7f46)
  
  
  
  ### What version are you seeing the problem on?
  
  v2.1
  
  ### How to reproduce the bug
  
  ```python
  def training_step(self, batch, batch_idx):
          x, y  = batch
          y_hat = self.forward(x)
          loss = torch.sqrt(self.loss_fn(y_hat,y))
          self.log("train_loss", loss, logger=True, prog_bar=True, on_epoch=True)
          return loss 
          
      def validation_step(self, batch, batch_idx):
          x, y  = batch
          y_hat = self.forward(x)
          loss = torch.sqrt(self.loss_fn(y_hat,y))
          self.log("valid_loss", loss, logger=True, prog_bar=True, on_epoch=True)
          return loss
  
     pl.Train(..., logger=TensorBoardLogger(save_dir='store',version=log_path), ....) # u can use any path you like
  ```
  
  
  ### Error messages and logs
  
  ```
  # Error messages and logs here please
  ```
  
  
  ### Environment
  
  <details>
    <summary>Current environment</summary>
  
  ```
  #- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow): 
  #- PyTorch Lightning Version (e.g., 1.5.0): 2.1.3
  #- Lightning App Version (e.g., 0.5.2):
  #- PyTorch Version (e.g., 2.0):
  #- Python version (e.g., 3.9): 2.1.2
  #- OS (e.g., Linux):
  #- CUDA/cuDNN version:
  #- GPU models and configuration:
  #- How you installed Lightning(`conda`, `pip`, source): pip 
  #- Running environment of LightningApp (e.g. local, cloud):
  ```
  
  </details>
  
  
  ### More info
  
  _No response_