Most probably a bug in the real mode video BIOS (int 10h).
Problem, as observed in plain MS-DOS - no ANSI.SYS or similar -
running command.com or other plain text mode programs with screen
scrolling :
Normally while scrolling the screen up by one line, character
attributes from the bottom line (usually line 25) are reinjected to
the new bottom line which is "scrolled in". After 25 (or whichever #
lines on screen) lines have been scrolled, all displayed lines will
have the same attributes.
However using DOS in virtualbox, the lines inserted at screen bottom
invariably come with default grey on black attribute (07) !
I have not investigated code used by (in the example) command.com
at instruction level, but since the 'right' behaviour I've been seing
on all real machines (for almost 30 years!) and only virtualbox
exhibits a difference, it has to be a bug in, most probably, the provided video BIOS.