BUG:DataFrame.to_csv not using correct line terminator on Windows within open block
- [x] I have checked that this issue has not already been reported.

- [x] I have confirmed this bug exists on the latest version of pandas.

- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.

---

**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.

#### Code Sample, a copy-pastable example

```python
import pandas as pd

students = [('Charlie', 'A'), 
           ('Rich', 'B'), 
           ('Katie', 'A'),
           ('Tommy', 'B'),
           ]

df = pd.DataFrame(students, columns =['Name', 'Grade']) 

with open('file1.csv',mode='w') as f:
    df.to_csv(path_or_buf=f)

df.to_csv(path_or_buf='file2.csv')
```

#### Problem description
Pandas currently seems inconsitent in terms of how it writes data to csv files using the to_csv method. I've looked at previous issues #20353 and #25048. Both are closed, but this issue seems to happen even right now in production Python 3

Above is a snippet of code, similar to #20353, that reproduces the issue. The result is that file1.csv has line endings that are \r\r\n and file2.csv has line endings that are as expected-- \r\n

#### Expected Output
In both cases, I'd expect:
,Name,Grade\r\n
0,Charlie,A\r\n
1,Rich,B\r\n
2,Katie,A\r\n
3,Tommy,B\r\n

Instead, in file1.csv, we see each row with a line ending of \r\r\n

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit           : b5958ee1999e9aead1938c0bba2b674378807b3d
python           : 3.7.4.final.0
python-bits      : 64
OS               : Windows
OS-release       : 10
Version          : 10.0.19041
machine          : AMD64
processor        : Intel64 Family 6 Model 23 Stepping 7, GenuineIntel
byteorder        : little
LC_ALL           : None
LANG             : None
LOCALE           : None.None

pandas           : 1.1.5
numpy            : 1.19.1
pytz             : 2020.1
dateutil         : 2.7.5
pip              : 20.3.3
setuptools       : 50.2.0
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : 2.11.2
IPython          : 7.18.1
pandas_datareader: None
bs4              : None
bottleneck       : None
fsspec           : None
fastparquet      : None
gcsfs            : None
matplotlib       : 3.3.1
numexpr          : None
odfpy            : None
openpyxl         : 3.0.5
pandas_gbq       : None
pyarrow          : None
pytables         : None
pyxlsb           : None
s3fs             : None
scipy            : 1.4.1
sqlalchemy       : None
tables           : None
tabulate         : None
xarray           : None
xlrd             : None
xlwt             : None
numba            : None

</details>
