Show virtual keyboard when a physical one is connected on Android 7
I had the reverse problem (Virtual Keyboard would not stop popping up) on My Galaxy Tab S3 running Android 7.0.  I didn't want to install many apps
so, discovered my problem to be the tablet's detection sequencing to be my problem.  I use my tablet almost exclusively as a laptop replacement. It sees my tablet, at virtually all times, connected to my Logitech K780.  I went into settings and turned off Show Virtual Keyboard, but the virtual
keyboard continued to pop up.  

I realized that the tablet had lost the
physical keyboard detection and was able to force a fresh detection by
turning off bluetooth function and paired again with keyboard and
my bluetooth mouse.  Problem solved!. I think, Your problem may be solved by turning off your bluetooth that causing your phone to detect no physical keyboard and then your setting to show the virtual one might work.