Is there a way to disable choice scrolling?

When using the "Show Choices..." command, sometimes the choices appear as a full list, and sometimes they appear as a list of ~4, where the user has to scroll up and down to see the range of choices.

The logic for this seems really arbitrary; like I've had choice boxes show/not show the scroll in various parts of my game even when I've made zero changes to them. Obviously it isn't random but it seems like it's controlled by some mechanism that is undocumented.

Firstly, can someone tell me what the conditions are which cause it to scroll?
Secondly, can someone tell me how to completely disable this behaviour? I really don't want it in my game (I've had users complain that they weren't able to find the right choice as they didn't know the box could scroll).
Do you by any chance use Yanfly's choice selection plugin?
Do you by any chance use Yanfly's choice selection plugin?

Yes, but my Max value for rows is set to 10, i.e. more than I ever need. I'm sure this happens without any choicelist related plugins too.
This is the culprit code in the default engine:
Code:
Window_ChoiceList.prototype.numVisibleRows = function() {
    var messageY = this._messageWindow.y;
    var messageHeight = this._messageWindow.height;
    var centerY = Graphics.boxHeight / 2;
    var choices = $gameMessage.choices();
    var numLines = choices.length;
    var maxLines = 8;
    if (messageY < centerY && messageY + messageHeight > centerY) {
        maxLines = 4;
    }
    if (numLines > maxLines) {
        numLines = maxLines;
    }
    return numLines;
};
It says, if message window's Y is less than half of the screen as well as message window's Y + message window's height exceedes half of the screen, there are only 4 lines at maximum, otherwise there are 8 visible lines at maximum.
So the most foolproof way is to not use choices with Center and Up window position as well as not using autoevent in messages.
A solution to have a relocable window and unlimited choices in a scroll window is a bit pain to implement, because you need to deal with the risk of running the choice window off screen or with the message window and the choice window overlapping, covering precious text sometimes.
It says, if message window's Y is less than half of the screen as well as message window's Y + message window's height exceedes half of the screen, there are only 4 lines at maximum, otherwise there are 8 visible lines at maximum.
So the most foolproof way is to not use choices with Center and Up window position as well as not using autoevent in messages.
A solution to have a relocable window and unlimited choices in a scroll window is a bit pain to implement, because you need to deal with the risk of running the choice window off screen or with the message window and the choice window overlapping, covering precious text sometimes.
Thanks for your advice; sorry, but can you clarify what you mean by the bolded bit? I think I get what you mean but I'm not quite certain.

Do you know if anyone's ever made a plugin where I can manually turn this behaviour on and off with a plugin call? I don't need a solution which ensures that the box never goes offscreen; I'm prepared to manually do that in this instance.
You should use Show choices only with Message window position down (you select it in the Show message command). Not with any other one or for example the autoevent tag Yanfly's message core offers.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-disable-choice-scrolling.113699/