I don't think so. For whatever reason Caffeine doesn't take a power assertion, as show by `pmset -g assertions`, whereas caffeinate does.
This is what prompted me to write Theine (https://github.com/lvillani/theine) to use the proper API for this task, since Caffeine would behave erratically with the lock screen active.
I use this all the time, it's the GUI version presumably.