ORA-03262: the file is non-empty when dropping a datafile

When dropping a datafile online from a tablespace, get below error:

SQL> alter tablespace TEST_TBS drop datafile '+DG1/ractest/datafile/test_tbs.521.1000824921';
alter tablespace TEST_TBS drop datafile '+DG1/ractest/datafile/test_tbs.521.1000824921'
*
ERROR at line 1:
ORA-03262: the file is non-empty

The datafile can be dropped online only if the datafile is empty:

SQL> alter tablespace TEST_TBS add datafile '+DG1' size 1m ;

Tablespace altered.

 SQL> alter tablespace TEST_TBS drop datafile '+DG1/ractest/datafile/test_tbs.483.1000830099';

Tablespace altered.